| |
GeekInterview.com > Interview Questions > Concepts > OOPS
| Print | |
Question: Difference Between Aggregation and Composition
Answer: What is the difference between Aggregation and Composition? (Asked in Polaris Interview for Java Experienced People, on April 11, in Chennai) |
| July 07, 2008 03:00:17 |
#2 |
| hafeez_munawar |
Member Since: July 2008 Total Comments: 2 |
RE: Difference Between Aggregation and Composition |
Aggregation: In aggregation , one object is composed of multiple objects and every object is useless without the relationship. Suppose there is a car object, so car object is useless without the tyre or steering object, and steering object is useless without car. This type of relationship is called Aggregation.
Compostion: One object is composed of several objects, in this type of relationship, every object has its own existance
|
| |
Back To Question | |