10.8 CLASSIFICATION OF INHERITANCE

Classification of inheritance is the toughest of all the tasks. Let us make a modest attempt. The first and foremost classification will be based on the levels of inheritance. Hence, there would be two types:

  1. Single level inheritance: It will signify only two levels of classes. Base class and derived class.
  2. Multilevel inheritance: It will signify three or more levels of classes. Derived class, base class and one or more intermediate classes.

A. Now let us study single level inheritance once again. We said there are two levels of classes. But how many classes at one level?

It will naturally lead to three sub types

  1. Simple inheritance: Signified by one base and one derived class.
  2. Hierarchical inheritance: Signified ...

Get Object Oriented Programming with C++, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.