Inheritance in OOP | Basic Concepts

Inheritance is one of the most important concept of Object-Oriented Programming. It is one of the building block for programming concepts.

What is Inheritance?

There are 5 points which will define the concept of Inheritanc.e in a simpler way:

  1. It is based on Generalization Principle.
  2. It explains about the logical association of Parent class with child class or Base class with Derived class. Child class inherits all the properties of parent calss and uses them.
  3. Inheritance runs over Open-Close Principle. That means base class is closed for modification whereas derived class is open for modification.
  4. It tells us how a derived class extends the behavior of base class (loosely coupled), which is Extensibility.
  5. It is based on Dependency Principle. That is Derived class can access the functionalities of base class, which is the concept of Reusability.

Leave a Reply

Your email address will not be published. Required fields are marked *