What is Aggregation and how it maps into a Java class?
2853
16-Apr-2011
Aggregation show the part of relationship how use it in java or mapping with java class?
Amit Singh
16-Apr-2011Take a 'Car', for example, it is consisted of an engine,a steering wheel, four tires,seats,gear box,fuel tank,engine oil tank, air filters etc.So all constituents of car are parts of it.
If a car is destroyed/smashed, its parts can still be used separately as spares in other cars,so these parts have individual use even when their conatiner entity is destroyed.
Example