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 is the difference between static and global variables and also define what are volatile variables?
0 Answers Flextronics, Hexaware,
What is the purpose of tostring() method in java?
explain me with a code snippet about the generation and handling of null point exceptions.
Which is the best sorting technique in java?
Where is stringbuffer stored?
If set accepts only one argument then how can it compare two objects to avoid duplicates
Can Exception handling we can handle multiple catch blocks?
which one is more efficient int x; 1. if(x==null) 2.if(null==x) state which one either 1 or 2?
Why Set interface contains unique elements, what internally implemented for this so that it contains unique elements?
How to synchonise HashMap
What are the advantages of exception handling in java?
Give me some null interfaces in java?