Inheritance
Chapter 3: 11th Computer Science · Computer Science · EN medium
Read from the source
Complete lesson
Inheritance inherits the other class is called derived class or child class. The derived class is a power packed class, as it can add additional attributes and methods and thus enhance its functionality. Notes The main advantage of inheritance is • It represents real world relationships well • It provides reusability of code • It supports transitivity . Types of Inheritance There are different types of inheritance viz., Single Inheritance, Multiple inheritance, Multilevel inheritance, hybrid inheritance and hierarchical inheritance. . Single Inheritance When a derived class inherits only from one base class, it is known as single inheritance . Multiple Inheritance When a derived class inherits from multiple base classes it is known as multiple inheritance . Hierarchical inheritance When more than one derived classes are created from a single base class , it is known as Hierarchical inheritance.
Related topics
Want this shaped for your exam marks?
Get an AI answer grounded in your actual textbook — with the exact page reference.
Ask AI about this topic →