What would you like to do?

What are the advantages of single inheritance over multiple inheritance?

already exists.

Would you like to merge this question into it?

already exists as an alternate of this question.

Would you like to make it the primary and merge this question into it?

exists and is an alternate of .

Advantages of multiple inheritances:
· Multiple inheritance allows a class to inherit the functionality of more than one base class thus allowing for modeling of complex relationships
· You categorize classes in many ways. Multiple inheritance is a way of showing our natural tendency to organize the world. During analysis, for example, we use multiple inheritance to capture the way users classify objects.
· By having multiple super-classes, your subclass has more opportunities to reuse the inherited attributes and operations of the super-classes.
Disadvantages of multiple inheritances:
· Some programming languages (such as Java) do not allow you to use multiple inheritances. You must translate multiple inheritance into single inheritance or individual java interfaces. This can be confusing and difficult to maintain because the implemented code for categorizing objects is quite different fro the way the user organizes those objects. So, when the user changes their mind or adds another category, it is difficult to figure out how to program the new sub classes.
· The more super classes your sub class inherits from the more maintenance you are likely to perform. If one of the super classes happens to change, the sub class may have to change as well.
· When a single sub class inherits the same attribute or operation form different super classes, you must choose exactly which one it must use.
Multiple inheritances can cause a lot of confusion, say when both the classes from which you want the child class to inherit from, has a method with same
Muhammad Shahbaz
Linux Administrator


Other Responses:


The Eiffel language and method was designed from the ground up to have multiple inheritance without ANY of the `gotchas' of languages like Java, C++ and others. The `disadvantages' listed above have nothing to do with MI, but with the technique and technologies listed (e.g. Java or C++). When MI is designed thoughtfully into a language and method, then the `dangers' or `disadvantages' are not there. As an Eiffel engineer, we use MI extensively, safely and beneficially all the time.
3 people found this useful
Thanks for the feedback!

Advantages of multiple inheritance in UML?

dvantages of multiple inheritances:· Multiple inheritance allows a class to inherit the functionality of more than one base class thus allowing for modeling of complex relati

Advantages of single inheritance?

Some advantages are: a. The child class comfortably extends all behavior from its parent class b. There is no confusion about who the parent class of this class in the inh

How do you remove ambiguity in multiple inheritance?

Use virtual base classes. It is best if the common base class has no member variables and all member methods are pure-virtual. The multiple-inheritance class must provide all

Disadvantages of multiple inheritance?

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

What is the definition of multiple gene inheritance?

Any of a group of nonallelic genes, each having a small quantitative effect, that together produce a wide range of phenotypic variation. Also called multiple factor, quantitat

How do you resolve ambiguity in multiple inheritance?

It is not clear what "multiple inheritance" means but ambiguities in wills are resolved in court on an action to construe the will. There are two types of ambiguities. Ones th

What is inherited?

Inherited is a characteristic that is passed from parent to offspring.

What is inheritance?

In computer terms, or more specifically in software design terms, inheritance is a method used with object oriented programming. In object oriented programming, object types (

What is the Difference between multiple inheritance and multilevel inheritance in asp.net?

Multiple inheritance, as the name 'multiple' suggests, is one where more than one(multiple) super class is inherited by one sub-class. It can be represented as: A   B   C \

What is multiple allele inheritance?

A gene has multiple alleles if there are more than two different alleles for that gene in the gene pool. For example, there are three different alleles for the ABO blood type
In Uncategorized

What is an inherited?

The English word 'inherited' means occurring among members of a family usually by heredity inherit or inherited : to be born with characteristics that your parents pass on to

Difference between inheritance and multiple inheritance?

Inheritance enables new classes(child class) inherit the properties  and methods of existing classes(parent class). Multiple inheritance  refers OOP feature in which a child

What is single and multiple inheritance?

Single inheritance is when a child class is derived from only one parent class. Multiple inheritance is when a child class is derived from more than one parent class. I shou