In object-oriented programming, what is the process of creating a new class based on an existing class called?
23 views
- Aggregation
- Inheritance (Correct Answer)
- Composition
- Encapsulation
Explanation
Answer: b) Inheritance
Explanation: In object-oriented programming, inheritance is the process of creating a new class based on an existing class. The new class inherits all the properties and methods of the existing class and can add new functionality or override existing behavior.