Aggregation and Composition
what is aggregation and composition in c#
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Guest UserRank #816 · 2.8K reputationPosted Feb 9, 2015, 11:49 PM EST
Mohit Sharma10 reputationPosted Feb 11, 2015, 11:02 PM EST
Represent relationship between two or more objects where all objects have their own life cycle and there is no owner. (Student, Teacher)
Aggregation: It is specialized form of association where all objects have their own life cycle but there is ownership. (Department, Teacher)
Composition: It is strong type of aggregation. In this relationship child object doesn't have their life cycle without parent object. If parent object deleted child object will also be deleted. (Houser, Room)
Dependency: It represents the relationship between two or more objects where an object is depend on another object. (Client, Supplier)
Jignesh TrivediRank #16 · 50.3K reputationPosted Feb 12, 2015, 12:52 AM EST
Please refer my article
http://www.c-sharpcorner.com/UploadFile/ff2f08/association-aggregation-and-composition/