Which OOP concept allows you to define a blueprint for creating objects?

  • Abstraction
  • Encapsulation
  • Inheritance
  • Polymorphism
Inheritance is the OOP concept that allows you to define a blueprint or template for creating objects. It enables a new class (derived or child class) to inherit properties and behaviors from an existing class (base or parent class). This mechanism facilitates code reuse and the creation of hierarchical relationships between classes, leading to more efficient and organized programming structures. Inheritance is a fundamental pillar of OOP alongside encapsulation, abstraction, and polymorphism.
Add your answer
Loading...

Leave a comment

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