Reiter
Classes can be used to create more specific sub-classes - child classes - that extend on their attributes and methods.
Here, the example of an electric car class as a child of the car class is used, to demonstrate how we can re-use most of our car class and add new functionality where needed, eg for the battery of our electric car.
Here, the example of an electric car class as a child of the car class is used, to demonstrate how we can re-use most of our car class and add new functionality where needed, eg for the battery of our electric car.