Answer Posted / balbir
Aggregation differs from ordinary composition in that it
does not imply ownership. In composition, when the owning
object is destroyed, so are the contained objects. In
aggregation, this is not necessarily true. For example, a
university owns various departments (e.g., chemistry), and
each department has a number of professors. If the
university closes, the departments will no longer exist,
but the professors in those departments will continue to
exist. Therefore, a University can be seen as a composition
of departments, whereas departments have an aggregation of
professors. In addition, a Professor could work in more
than one department, but a department could not be part of
more than one university
Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
Why packages are used?
How can we make copy of a java object?
Does java allow default arguments?
Which is the class in java?
Can we declare array without size in java?
What is io stream in java?
What is a container in a gui?
How do you add an element to a set in java?
What advantage do java's layout managers provide over traditional windowing systems?
Hi Anyone know the model / questions of the Federal bank sample questions for the post of Specialist Officers - Programmers. Please post if anyone have..
what is meant by HQL?
What is the right data type to represent a price in java?
Can a class be final?
Is arraylist an object in java?
What language is pass by reference?