algorithms (22) Design Patterns (20) java (19) linux (14) Snippet (13) service mix (6) soa (4)



Composition Vs Aggregation

Composition vs Aggregation


  1. Composition and Aggregation are almost the same 

  2. composition the contained objects do not exist independently in                                case of the above example the Heart cannot exist without the person.

  3. Aggregation the contained objects can exist independently like 
    Money exists without a person.

No comments:

Post a Comment

Search 24 Bytes