D.2.5 Explain the advantages of inheritance.
Reusability -- facilitates the use of existing public methods of base/super class without rewriting the same, thus minimize the amount of duplicate code in an application by sharing common code amongst several subclasses
Extensibility -- extending the base class logic as per business logic of the derived/subclass class
Data hiding -- base/super class can decide to keep some data private so that it cannot be altered by the derived/subclass class
Overriding -- ability to override the methods of the base/super class so that meaningful implementation of the base/super class method can be designed in the derived/subclass.
Increased time/effort for the programmer to go through all the levels of overloaded classes.
Instances when two classes (base and inherited class) get tightly coupled. This means one cannot be used independent of each other.
Time spent when a method signature is changed, both base and derived classes are affected (inheritance & composition)
If a method is deleted in the "super class" or aggregate, the whole derived class has to be refactored.