Question

Which of the following is an example of inheritance in OOP?

A A class Car has a method start() that is also defined in class Vehicle.
B Class Bird contains a method fly(), which is not related to any other class.
C Class Employee contains attributes name and salary, while class Manager inherits from Employee.
D An object sends a message to another object requesting it to perform an action.
E Class Circle has a method area() that calculates its area.
Practice Next

Relevant for Exams:

Hey! Ask a query