Problem Analysis  «Prev 

Qualifiers Reduce Multiplicity

Start with the class diagram of Customer and Order.
1) Start with the class diagram of Customer and Order. The association shows one customer places zero or more orders.

To look up a customer's orders individually, identify a field that will uniquely identify the order.
2) To look up a customer's orders individually, identify a field that will uniquely identify the order. The attributes reveal the order number to be a unique identifier.

UML Distilled
Place the qualifier box next to the class that will use it.
3) Place the qualifier box next to the class that will use it. The customer objects need to look up unique orders by ordernumber, so place the qualifier box next to the customer class.


Next copy the order number  attribute name and data type and place them in the qualifier box.
4) Next copy the order number attribute name and data type and place them in the qualifier box.

Reduce the multiplicity to show that the ordernumber qualifier allows us to reference exactly one order at a time. The multiplicity is reduced to 1 because the qualifier is a unique value
5) Reduce the multiplicity to show that the ordernumber qualifier allows us to reference exactly one order at a time. The multiplicity is reduced to 1 because the qualifier is a unique value. If the qualifier is not unique, then it remains zero or more (*), but the actual number of objects decreases.