1.

Which type of relationship is modelled by Composition?(a) Is-A relationship(b) Has-A relationship(c) Part-Of relationship(d) Have-A relationshipThis question was addressed to me in my homework.My question is taken from Class Relationships topic in division Class Hierarchies, Library & Containers of C++

Answer» RIGHT option is (c) PART-Of relationship

The explanation: Composition models the part-of relationship between CLASSES. In this CHILDREN cannot exits without a parent, therefore, they are part of each other.


Discussion

No Comment Found

Related InterviewSolutions