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 |
what's diff between struts 1.1 & 1.2
What are the three parts of a lambda expression? What is the type of lambda expression?
What are scalar data types?
What is an eror in java?
What are the override methods in Object class?
2 Answers Tech Mahindra, Wipro,
. What are the differences between constructor and method of a class in Java?
What are local variables?
Explain the difference between the Boolean & operator and the && operator?
What is a condition in programming?
What is a percentage sign called?
Why to give the file name same as the public class name in java?
Difference between a MenuItem and a CheckboxMenuItem?