1.

Which type of relationship is modelled by Inheritance?(a) Is-A relationship(b) Has-A relationship(c) Part-Of relationship(d) Belongs-to relationshipThis question was addressed to me in an international level competition.I would like to ask this question from Class Relationships in division Class Hierarchies, Library & Containers of C++

Answer»

The correct OPTION is (a) Is-A relationship

Best explanation: Inheritance models Is-A TYPE of relationship between classes. This is because in this case DERIVED class inherits all property of the BASE class and Is-A type of B class.



Discussion

No Comment Found

Related InterviewSolutions