Inheritance is a way of extending class. The new class (child class) builds logic on the top of the parent class (super class).
Here's an example:
Output:
Basically the child class can add, extend, rewrite or use the inherited logic from the parent.
For this example:
doorsCount (line 33)line 42)line 58)representation method (line 51)getInsuranceCost (line 36)getMake (line 18)getModel (line 23)