Computer Science, asked by yugantar5830, 11 months ago

Difference between multiple inheritance and multilevel inheritance

Answers

Answered by shravanbpatel8pe2wzo
0

Object-Oriented Programming (OOP) is a paradigm to design a program using classes and methods. Real world scenarios can be mapped to objects. Therefore, it is easy to build software solutions. A class is a blueprint to build an object. It contains properties and methods. For example, before creating a student object, there should be a class student with properties and methods. A student can have properties such as student id, name and methods such as read, write, study. Methods describe the behaviour while properties are the attributes. After creating the class, it is possible to create objects using them. Object creation is also known as Object Instantiation. Object does not exist in isolation. They communicate with other objects and data is passed within objects. One pillar of OOP is Inheritance. The purpose of Inheritance is to increase code reusability. It creates a new class of properties and methods of the already existing class. The existing class is known as the base class, and the new class is called the derived class. Multiple Inheritance and Multilevel Inheritance are inheritance types. This article discusses the difference between them. The key difference between Multiple and Multilevel Inheritance is that Multiple Inheritance is when a class inherits from many base classes while Multilevel Inheritance is when a class inherits from a derived class making that derived class a base class for a new class.

Similar questions