When to use aggregation, association?

661 Views Asked by At
  • is there any why to know which one of two types of interaction mentioned[aggregation or association] should be used in class diagram ?
  • is it even matter to specify which one to use in a certain interaction ?
1

There are 1 best solutions below

1
Prakash Jethava On

Assosiation
      The most abstract way to describe static relationship between classes is using the Association link, which simply states that there is some kind of a link or a dependency between two classes or more.
Aggregation
       In cases where there’s a part-of relationship between ClassA (whole) and ClassB (part), we can be more specific and use the aggregation link instead of the association link, highlighting that the same ClassB instance can also be aggregated by other classes in the application (therefore aggregation is also known as shared association).

If you want to read detailed description then check this LINK