Posted by : Sushanth Thursday 17 December 2015

Aggregation 
Aggregation is a specialize form of Association where all object have their own lifecycle but there is a ownership like parent and child. Child object can not belong to another parent object at the same time. We can think of it as "has-a" relationship.
Implementation details:
1.Typically we use pointer variables that point to an object that lives outside the scope of the aggregate class
2.Can use reference values that point to an object that lives outside the scope of the aggregate class
3.Not responsible for creating/destroying subclasses
Example:
A single Employee can not belong to multiple Companies (legally!! ), but if we delete the Company, Employee object will not destroy.
Here is respective Model :.

Leave a Reply

Subscribe to Posts | Subscribe to Comments

- Copyright © Technical Articles - Skyblue - Powered by Blogger - Designed by Johanes Djogan -