Domain-specific relationships can be represented using UML associations.
Review the Associations lecture.
Recall the facts from our point-of-sale application:
In our retail sales example there are two important relationships are given by F1 and F4:
F1: Customers make purchases.
F4: One or more items are sold in a purchase.
We can formalize them as:
Customer X makes Purchase Y.
Item X is sold in Purchase Y.
Relationships are represented by associations in UML:
Just as a class is a template for creating objects, an association between classes A and B is a template for creating links be instances of A and instances of B.
For example:
Aggregations and compositions are such common types of associations that they have their own special UML icons.
Associations can also be represented as objects:
UML also provides special notation for representing constraints on classes, associations, and other UML elements.