Composition means that the object doesn't make sense without the composed part.
Aggregation means the aggregated part can exist independently from the object.
Example: a car doesn't make much sense without an axle and vice versa. So a car is composed of an axle. But the CD player in the car can exists independently from the car (in some cases). So the car and the CD player are aggregated.
Liked By
Write Answer
Aggregation and Composition in java
Join MindStick Community
You have need login or register for voting of answers or question.
Anonymous User
17-Mar-2015Samuel Fernandes
17-Mar-2015