- The child class should inherit everything it can from its
parent class and only add additional code for new instance variables
and the methods that are not in the
parent class or need to have different behavior.
-
Inheritance is a very powerful mechanism for reusing code and is an
important feature of all object-oriented programming languages.