English
Tamil Nadu Board of Secondary EducationHSC Science Class 11

What is the difference between polymorphism and inheritance though are used for the reusability of code? - Computer Science

Advertisements
Advertisements

Question

What is the difference between polymorphism and inheritance though are used for the reusability of code?

Distinguish Between

Solution

Polymorphism:

  • Reusability of code is implemented through functions (or) methods.
  • Polymorphism is the ability of a function to respond differently to a different message.
  • Polymorphism is achieved through overloading.

Inheritance:

  • Reusability of code is implemented through classes.
  • Inheritance is the process of creating derived classes from the base class or classes.
  • Inheritance is achieved by various types of inheritances namely single, multiple, multilevel, hybrid, and hierarchical inheritances.
shaalaa.com
  Is there an error in this question or solution?
Chapter 16: Inheritance - Evaluation - Section - C [Page 273]

APPEARS IN

Samacheer Kalvi Computer Science [English] Class 11 TN Board
Chapter 16 Inheritance
Evaluation - Section - C | Q 3. | Page 273
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×