Composition and Aggregation using Java
by, 04-26-2012 at 07:15 PM (2498 Views)
Always, there exist a confusion b/w aggregation & composition. In case of a practical field of aggregation and compostion, it shall be kept in minf that both of them are of association type. Below is given the definition of term. After that practical java code is given so that to exactly understand that how aggregation and composition implementation could be implemented in programming.
Objectís life time is considered to be the same. For instance, composition is present b/w a car and a car frame. In case of destruction of car, the car frame will also be destructed.
Objectís life times are not similar. Even after the destruction of other object there is the possibility present of presence of other object.