हिंदी
तमिलनाडु बोर्ड ऑफ सेकेंडरी एज्युकेशनएचएससी विज्ञान कक्षा ११

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

Advertisements
Advertisements

प्रश्न

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

अंतर स्पष्ट करें
Advertisements

उत्तर

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
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 16: Inheritance - Evaluation - Section - C [पृष्ठ २७३]

APPEARS IN

सामाचीर कलवी Computer Science [English] Class 11 TN Board
अध्याय 16 Inheritance
Evaluation - Section - C | Q 3. | पृष्ठ २७३
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×