Discovering aggregation relationships between classes can help the process of im
ID: 3829333 • Letter: D
Question
Discovering aggregation relationships between classes can help the process of implementation because
objects may need to share global variables to make the implementation simpler
one object may need to contain objects of another class as data elements in order to simplify the problem solution
they may need to be put together into a vector
aggregation is the only relationship that classes can have
objects may need to share global variables to make the implementation simpler
B.one object may need to contain objects of another class as data elements in order to simplify the problem solution
C.they may need to be put together into a vector
D.aggregation is the only relationship that classes can have
Explanation / Answer
Aggregation is a specialized form of Association where all objects have their own lifecycle, but there is ownership and child objects can not belong to another parent object.
Let's take an example of Department and teacher. A single teacher can not belong to multiple departments, but if we delete the department, the teacher object will not be destroyed. We can think about it as a “has-a” relationship.
In classes, we can use inheritance or polymorphism characteristic to implement functionality in effective manner. This is one of the use of aggregation property.
ANS->B One object may need to contain objects of another class as data elements in order to simplify the problem solution.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.