Explain the relationship between inheritance and polymorphism.

QuestionsExplain the relationship between inheritance and polymorphism.
priyankaPublished on: 4/28/2025 4:28:18 AM



1 Answers
Best Answer 0

Inheritance is a logical way of inheriting the parent properties into the child classes and the child class also has its own properties that are different from the parent. The child class can also have customized properties.

Polymorphism as the name suggests is the way of giving same name to many functions. Usually I give same name to the functions that perform the same functionality. But the requirement of different functions is due to the difference in number of arguments the function takes or the return type of the functions being different.