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 |
Question 6 [9] 6.1 In what situations (in general) would you use a TreeMap? (3) 6.2 In what situations (in general) would you use a HashSet to store a collection of values?
what is comparable and comparator interface?
What are access specifiers available in java?
What is difference between this and super keyword?
What is thread synchronization in java?
What is advantage of java?
What does next mean in java?
what are variables in java
What best practices should you follow while writing multithreaded code in java?
What is a default constructor and also define copy contrucyor?
Why parsing is done?
What is the difference between static class and normal class?