Inheritance in OOP allows a class to:

2024

Inheritance in OOP allows a class to:

  1. A.

    Inherit properties and behavior from another class

  2. B.

    Create instances of another class

  3. C.

    Override methods of another class

  4. D.

    More than one of the above

  5. E.

    None of the above

Attempted by 713 students.

Show answer & explanation

Correct answer: D

Inheritance in OOP allows a class to inherit properties and behavior from another class. This enables code reuse and promotes a hierarchical relationship between classes. A derived class can access the data members and methods of the base class. Additionally, it can override methods to provide specific behavior. Thus, inheritance supports both property and behavior reuse, as well as method overriding.

Explore the full course: Up Lt Grade Assistant Teacher 2025