Inheritance is not just simply about creating various derived classes trough a base class. There are some other benefits of using Inheritance in Object Oriented languages.
- When inherited from another class, the code that provides a behavior required in the derived class need not have to be rewritten. Benefits of reusable code include increased reliability and a decreased maintenance cost because of sharing of the code by all its users.
- When multiple classes inherit from the same super class, it guarantees that the behavior they inherit will be the same in all cases.
- Inheritance permits the construction of reusable software components.
- It provides improved code organization and reliability.
- Code redundancy can be avoided.
En este articulo:c++,Hybrid inheritance,inheritance,inheritance in OOP,Object oriented programming,oop
Escrito por
Krish Advani
Administrador de ENGGDRCAOS. Canal dedicado especialmente a la formación del estudiante que aspira a ser ingeniero. Todos los videos son Ingles. Apasionado del universo Apple, estudiante de Ingeniería y Gamer por vocación.