Level 2

Multiple Inheritance

views

5:05
Now imagine we have a base class bird. Different types of birds like crow, sparrow, parrot etc are derived from this class. There is another base class animal. Animals like dog, cat, mouse etc are derived from this class. Now let us take the example of a bat. It is an animal. But it can also fly like a bird. At such times we make use of multiple inheritance which means that this class is derived from two base classes.