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
What is a line separator in java?
What about abstract classes in java?
What is the difference between an object-oriented programming language and object-based programming language?
How do we access static members in java?
What are the types of exceptions?
Is java based on c?
What is double in java?
What is scope & storage allocation of static, local and register variables? Explain with an example.
What is percentage in java?
What are the types of methods in java?
What are the data types supported by java?
Can you achieve runtime polymorphism by data members?
What is the difference between processes and threads?
Explain the difference between call by refrence and call by value?
Is arraylist a class in java?