Sunday, August 12, 2018

What is difference composition and Aggregation.

Example: 

A library contains students and books. Relationship between library and students is Aggregation. Relationship between library and books is composition. A student can exist without a library and therefore it is aggregation. A book cannot exists without a library and therefore it is composition.







No comments:

Post a Comment