Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

When will you use multiple inheritance and when will you use multi level inheritance Describe with an example?

Inheritance level multi
0
Posted

When will you use multiple inheritance and when will you use multi level inheritance Describe with an example?

0

“Multiple Inheritance is when a derived class inherits properties and methods from multiple classes as opposed to Single Inheritance. So, for cases where I find that I have two or more classes and another new class is to be created that has properties and behaviour of both or all the base classes then I use Multiple inheritance. For example, If base class one is Terrestrial and Base Class two is Aquatic, then the new class Amphibian will be case of multiple inheritance deriving from both the two base classes.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123