Ask Question
26 December, 05:25

How does the "is-a" relationship relate to inheritance? Give an example of such a relationship.

+4
Answers (1)
  1. 26 December, 05:56
    0
    "is-a" relationship is used to indicate that a derived class belongs to the family of base class.

    Explanation:

    IS-A relationship based on Inheritance, which can be of two types Class Inheritance or Interface Inheritance.

    "is-a" relationship is used to indicate that a derived class belongs to the family of base class. For example vehicle is a class which belongs to car base class.

    Any derived class that extends base class have " is-a " relation ship with base class

    Any class that implement an interface also has " is-a " relation ship" with the interface
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “How does the "is-a" relationship relate to inheritance? Give an example of such a relationship. ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers