1.

In which of the following relationship objects of related classes can occur independently?(a) Aggregation(b) Association(c) Composition(d) Both Aggregation an AssociationI had been asked this question in an online quiz.Query is from Class Relationships topic in division Class Hierarchies, Library & Containers of C++

Answer»

The CORRECT option is (d) Both Aggregation an ASSOCIATION

The explanation is: In both Aggregations and Association of objects of related classes can occur INDEPENDENTLY. For example, an employee can have a bank and a bank can have an employee. Also, Association is a superset of Aggregation, THEREFORE, it also follows the same.



Discussion

No Comment Found

Related InterviewSolutions