If more than one class is inherited from the base class , it’s known as hierarchical inheritance. In hierarchical inheritance, all features that are common in child classes are included in the base class. For example, Physics, Chemistry, Biology are derived from Science class.
Read moreWhat is hierarchy inheritance in OOP?
Hierarchical inheritance. This is where one class serves as a superclass (base class) for more than one sub class . For example, a parent class, A, can have two subclasses B and C. Both B and C’s parent class is A, but B and C are two separate subclasses.
Read more