answersLogoWhite

0


Best Answer

1. Single Inheritance

A Scenario where one class is inheriting/extending the behavior of just one super class.

Ex: public class Ferrari extends Car {…}

2. Multilevel Inheritance

A Scenario where one class is inheriting/extending the bahavior of another class which in turn is inheriting behavior from yet another class.

Ex: public class Automobile {…}

Public class Car extends Automobile {…}

Public class Ferrari extends Car {…}

This multilevel inheritance actually has no limitations on the number of levels it can go. So as far as java goes, it is limitless. But for maintenance and ease of use sakes it is better to keep the inheritance levels to a single digit number.

User Avatar

Wiki User

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

Wiki User

9y ago

There are five type of inheritance one of them is multiple inheritance. Example a child has features inherited from mother as well as father.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are the codes examples for multi level inheritance?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

How many class of Hierarchical Inheritance?

There are 2 main types of Hierarchical Inheritance - Single and Multi Level Class A extends Class B - Single Class A extends Class B which in turn extends Class C - Multi level. Actually there is no limit to the number of levels till which you can inherit classes in multi level inheritance. But it is preferable to keep it at around 3 or 4 for ease of maintenance and understanding.


How many levels of inheritance can be possible with multi level inheritance?

There is no limit actually. But, it is preferable to keep the levels under 6-7 for ease of use and maintenance


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.


What is multilevel inheritance in C plus plus?

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.


Type of inheritance?

There are 2 Types of genetic Inheritance. 1. Polygenic inheritance, also known as quantitative or multi-factorial inheritance refers to inheritance of a phenotypic characteristic (trait) that is attributable to two or more genes and their interaction with the environment. Polygenic traits do not follow patterns of Mendelian inheritance (qualitative traits). Instead, their phenotypes typically vary along a continuous gradient depicted by a bell curve. Eye color and skin color are both polygenetic traits. 2. Monogenic inheritance is controlled by a single gene, as opposed to multigenic.

Related questions

What type of inheritance is supported by php?

PHP Supports Multi Level Inheritance


Can you give Practical example for multilevel Inheritance?

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


How many class of Hierarchical Inheritance?

There are 2 main types of Hierarchical Inheritance - Single and Multi Level Class A extends Class B - Single Class A extends Class B which in turn extends Class C - Multi level. Actually there is no limit to the number of levels till which you can inherit classes in multi level inheritance. But it is preferable to keep it at around 3 or 4 for ease of maintenance and understanding.


How many levels of inheritance can be possible with multi level inheritance?

There is no limit actually. But, it is preferable to keep the levels under 6-7 for ease of use and maintenance


Type of inheritances in c plus plus?

Single, multiple, multi-level, hierarchical and hybrid/virtual inheritance. Single inheritance applies when one class inherits from just one base class. Multiple inheritance applies when one class inherits from two or more base classes. Multi-level inheritance applies to a class that inherits from at least one base class that is itself derived from another base class. Hierarchical inheritance applies to a base class that is inherited by two or more separate derived classes. Hybrid inheritance combines multiple inheritance, multi-level inheritance and hierarchical inheritance. That is, where A is a common base class of derived classes B and C, and B and C are both base classes of derived class D. Hybrid inheritance is often used with virtual inheritance where B and C inherit from A virtually rather than directly. In these cases, the virtual base class is instantiated by the most-derived class in the hierarchy, D, and this instance is then shared by both B and C.


What is the Difference between multilevel and multiple inheritance?

Multiple Inheritance : we can inherit more than one class in the same class. Multi-Level Inheritance: where one class can inherit only one base class and the derived class can become base class of some other class.


What are some examples and non-examples of multi celled?

somethings are single celled. but some cells are multi celled like humans.


What are examples of multi national corporation?

McdonaldAirbus


Impacts of multinational company on the host country with examples?

multi-national examples


What are the 5 types of inheritance patterns?

There are 4 types of inheritence:1. Single2. Multiple3. Multi-Level4. Heirchy


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.


What is multilevel inheritance in C plus plus?

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.