Hierarchical Inheritance

Hierarchical Inheritance :

hierarchical inheritance

When a class is inherited by more than one class ,then ,its called hierarchical inheritance.

  • There is one parent with more than one child class.
  • Here, classes B, C & D inherit class A. A is a parent for all classes B, C, D.
Following program illustrates Hierarchical inheritance in C++ :

OUTPUT :

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *