What is aggregation and composition ?
Answer / 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 |
Does sprintf allocate memory?
What is used of static keyword in java?
What is an Iterator interface?
Can a function return a function?
Is it possible to compare various strings with the help of == operator?
What is the difference between interpreter and compiling ?
What are the limitations for static method?
What is runtime locatable code?
What are the steps in the jdbc connection?
What are virtual methods?
How are observer and observable used in java programming?
How the metacharacters are different from the ordinary characters?