adspace
Answer Posted / Peer Golden Hansda
1. Code Reusability: Inheritance allows developers to reuse code written for a parent class in child classes, reducing the amount of time and effort required to develop similar functionality for multiple classes.
2. Improved Modularity: By organizing code into base classes and derived classes, inheritance makes it easier to create modular programs that are easier to maintain and debug.
3. Polymorphism: Inheritance enables polymorphism, allowing objects of different classes to be treated as if they were instances of a common superclass.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers