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 happens when I use / and % with a negative numerator?
What is qualitative variable?
There are 2 different ways to create an object. a)By using keyword "new" b)By using Class.forName ("className").newInstance(); What is the difference between these 2 methods.
What is string data type?
What is data movement?
Why we should declare the variables as static and final in interfaces?
Where can I find data structures question and answers with comprehensive working code written in Java
what is the use of pojo (plain old java objects)? how it is interact with crystal reports? pls urgent
what is difference betwwen hashmap and hashtable ?
Java support call by reference (pass by reference) ?
What are the advantages of unicode?
Define jit compiler?