Abstract Classes and Methods
Define partially implemented base classes with abstract keywords.
Intro: Abstract Classes
An abstract class cannot be instantiated directly — it's a template. Abstract methods declare a signature with no implementation; subclasses must provide them.
Key Concepts
Key concepts:
- Declared with
abstract class - Abstract methods have no body:
abstract public function x(); - Subclasses must implement all abstract methods
- Can contain both abstract and concrete methods
All lessons in this course
- Extending Classes with Inheritance
- Abstract Classes and Methods
- Implementing Interfaces
- Traits for Code Reuse