| What is multiple inheritance? What are its advantages and disadvantages? |
|
|
|
| Thursday, 01 September 2011 15:22 |
|
Multiple Inheritance is the process whereby a child can be derived from more than one parent class. The advantage of multiple inheritance is that it allows a class to inherit the functionality of more than one base class thus allowing for modeling of complex relationships. The disadvantage of multiple inheritance is that it can lead to a lot of confusion (ambiguity) when two base classes implement a method with the same name. |
| Related Articles | Random Articles | Latest Articles |
More articles :
» When should we use multiple inheritance
There are three acceptable answers: - "Never,""Rarely," and "When the problem domain cannot be accurately modeled any other way." Consider an Asset class, Building class, Vehicle class, and Company Car class. All company cars are vehicles....



