Ask Question
25 July, 07:23

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

+5
Answers (1)
  1. 25 July, 07:47
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers