answersLogoWhite

0


Best Answer

Multi-level inheritance involves at least 3 classes, a, b and c, such that a is derived from b, and b is derived from c. c is therefore the least-derived base class, b is an intermediate base class and a is the most-derived class.

User Avatar

Wiki User

10y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

Multi-level inheritance occurs when a derived class is also a base class. That is, class A is the base class of class B, while class B is the base class of class C. Class C therefore inherits the sum total of all public and protected members of class A and class B.

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

Multiple inheritance relates to a class that is directly derived from two or more base classes. The derive class directly inherits the sum of all the public and protected members of all base classes.

Multi-level inheritance relates to a class that derives from a base class which is itself derived from another base class. The least-derived base class is indirectly inherited by the most-derived class. That is; the most-derived class inherits the sum of all the public and protected members of all its base classes (whether directly or indirectly.

Multiple inheritance and multi-level inheritance can also be combined. This can lead to ambiguity issues if two or more base classes are derived from a common base class. To avoid this problem, the common base class can be inherited virtually in the derived base classes, thus the most-derived class will inherit directly from the common base class, and the base classes will share the same instance of the common base class.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is multilevel inheritance in C plus plus?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Programme to implement single and multilevel inheritance taking employee as sample base class in c plus plus?

struct employee { }; struct supervisor : employee { // single inheritance -- a supervisor inherits all the public and protected properties of an employee. }; struct manager : supervisor { // multilevel inheritance -- a manager inherits all the public and protected properties of a supervisor (and therefore an employee). };


Why does Java support multilevel inheritance?

Because it is one of the most important and widely used inheritance concepts in Java. In multi level inheritance a class directly inherits features from one class and indirectly inherits features form other classes that are in the inheritance hierarchy.


Specification forms of inheritance in java?

single level inheritance eg ( class B extends Class A) Multilevel inheritance eg( class C extends class B and class B extends class A) multiple inheritance Class C inherits Class A features as well as Class B featues.This type of inheritance is not allowed in JAVA.


How ploymorphism and inheritance is different from that in Java and c plus plus?

C++ allows multiple inheritance while Java does not. In my opinion, multiple inheritance is not useful because it can get very confusing very quick. For polymorphism, C++ does early binding by default, while Java does late binding by default. Late binding is more useful than early binding.


What are the similarities between java and c plus plus?

Java is related to C and C++ in the structure of programs composed with each language. All of them are object-oriented-programming languages (oop languages). Java is meant primarily for web apps C is meant primarily for programming servers C++ is meant primarily for large applications bbb

Related questions

Programme to implement single and multilevel inheritance taking employee as sample base class in c plus plus?

struct employee { }; struct supervisor : employee { // single inheritance -- a supervisor inherits all the public and protected properties of an employee. }; struct manager : supervisor { // multilevel inheritance -- a manager inherits all the public and protected properties of a supervisor (and therefore an employee). };


Different types of inheritances?

Single Inheritance Multiple Inheritance Multilevel Inheritance


Why does Java support multilevel inheritance?

Because it is one of the most important and widely used inheritance concepts in Java. In multi level inheritance a class directly inherits features from one class and indirectly inherits features form other classes that are in the inheritance hierarchy.


Does c plus plus supports hierarchical inheritance?

Yes.


Specification forms of inheritance in java?

single level inheritance eg ( class B extends Class A) Multilevel inheritance eg( class C extends class B and class B extends class A) multiple inheritance Class C inherits Class A features as well as Class B featues.This type of inheritance is not allowed in JAVA.


How ploymorphism and inheritance is different from that in Java and c plus plus?

C++ allows multiple inheritance while Java does not. In my opinion, multiple inheritance is not useful because it can get very confusing very quick. For polymorphism, C++ does early binding by default, while Java does late binding by default. Late binding is more useful than early binding.


Can you give Practical example for multilevel Inheritance?

Grandfather-father-child relationship is an example for multi level inheritance..


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\ | /DOn the other hand, in case of multilevel inheritance; the superclass is inherited by a sub-class which is in turn inherited by another class leading to the different level. It can be represented as:A|B|CHowever in asp, multiple inheritance is not supported.


What are the different types of inheritence?

there are several type of inheritance are exist like 1. single inheritance 2. double inheritance 3. multiple 4. multilevel 5. heirarchical inheritance


Write a c plus plus programme to illustrate single inheritance?

struct A {}; // base class struct B : A {} // derived class (single inheritance).


How can a constructor be invoked at the time of inheritance in C Plus Plus?

It cannot. Inheritance is a compile-time operation. Constructors are invoked at runtime at the point of instantiation.


Specialization form of inheritance?

Inheritance refers to the concept by which the features from one class can be extended/made available in other classes. Java supports 3 forms of inheritance * Single Inheritance * Multiple Inheritance * Multilevel Inheritance (Can be implemented using interfaces)