Search code examples
propertiesaggregationumlclass-diagram

aggreagation kind in UML


As I read that

aggreagation kind is a property of the association's member ends

And also

aggregation, association and composition are features of the properties, which take part in the association as associatio ends, and is called AggregationKind.

Could you Please clarify the two sentences through a UML simple example?


Solution

  • It is obvious that both the sentences have basically the same meaning.Generally,in many-to-many associations the association has itself two or more Properties as MemberEnds. We can describe these properties separately using a type called aggregationkind. This property in fact has an attribute aggregation of type AggregationKind.

    AggregationKind is an enumeration type that specifies the literals for defining the kind of aggregation of a property or you can simply say AggregationKind defines the type of aggregation with the help of following basic literals:

    • none Indicates that the property has no aggregation.
    • shared Indicates that the property has a shared aggregation.
    • composite Indicates that the property is aggregated compositely, i.e., the composite object has responsibility for the existence and storage of the composed objects (parts).

    It’s this AggregationKind that specifies the difference between a regular Association, an Aggregation and a Composition.We can understand this with help of following diagram: enter image description here

    NOTE: the diagram is taken from here

    Some of the useful links regarding this topic:

    1. http://www.uml-diagrams.org/association.html

      2.http://www.cs.sjsu.edu/~pearce/modules/lectures/uml/class/Aggregation.htm