Creating Child Classes from an Abstract Class
Explore how to create child classes from abstract classes in PHP, implement required abstract methods, and add unique methods. This lesson guides you through inheritance specifics while working with practical examples like Honda and Toyota classes.
We'll cover the following...
We'll cover the following...
Since we can’t create objects from abstract classes, we need to create child classes that inherit the abstract class code. Child classes of abstract classes are also formed with the help of the extends keyword. They’re only different in that they have to add the bodies to the abstract methods.
Note: The child classes that inherit from abstract classes must add bodies to the abstract ...