Data Structures using C PlusPlus: Chapter 2: Inheritance and Polymorphism

Basic Concept of Inheritance

Question: 1. What is Inheritance ? List out the advantages of Inheritance.

Basic Concept of Inheritance

 

• Definition:

Inheritance is a property in which data members and member functions of some class are used by some other class.

• Inheritance allows the reusability of the code in C++.


Advantages of inheritance

1. Reusability : The inheritance allows its developer to reuse the code written in the base class.

2. Extensibility : The base class can be extended to the derived class and the required business logic can be written in the derived class.

3. Data hiding : The information that need to be hidden from the derived class can be made private. Hence inheritance also helps its developer not to get the information altered by any derived class.


Review Question

1. What is Inheritance ? List out the advantages of Inheritance.

 

Data Structures using C PlusPlus: Chapter 2: Inheritance and Polymorphism : Tag: Data Structure, C++, C Programing : - Basic Concept of Inheritance


Data Structures using C PlusPlus: Chapter 2: Inheritance and Polymorphism



Under Subject


Data Structures using CPlusPlus

CS25C05 2nd Semester ECE Dept | 2025 Regulation | 2nd Semester 2025 Regulation



Related Subjects


English Essentials II

EN25C02 2nd Semester | 2025 Regulation | 2nd Semester 2025 Regulation



Linear Algebra

MA25C02 2nd Semester | 2025 Regulation


Electron Devices

EC25C01 2nd Semester ECE Dept | 2025 Regulation | 2nd Semester 2025 Regulation


Data Structures using CPlusPlus

CS25C05 2nd Semester ECE Dept | 2025 Regulation | 2nd Semester 2025 Regulation


Circuits and Network Analysis

EC25C02 2nd Semester ECE Dept | 2025 Regulation | 2nd Semester 2025 Regulation


Re-Engineering for Innovation

ME25C05 2nd Semester | 2025 Regulation | 2nd Semester 2025 Regulation


Engineering Drawing - Laboratory

ME25C01 2nd Semester | 2025 Regulation | 2nd Semester 2025 Regulation


Data Structures using CPlusPlus - Laboratory

CS25C05 2nd Semester ECE Dept | 2025 Regulation | 2nd Semester 2025 Regulation


Devices and Circuits Laboratory

EC25C03 2nd Semester ECE Dept | 2025 Regulation | 2nd Semester 2025 Regulation