What is Multiplicity
Multiplicity in class diagram should be indicated at each end of the association. This specifies the minimum and maximum number of instances that can be linked.
For example, a car has 3 or 4 wheels, but each wheel belongs to exactly one car. Place multiplicity notations near the ends of an association. These symbols indicate the number of instances of one class linked to one instance of the other class.
For example, one company will have one or more employees, but each employee works for one company only.
- The minimum and maximum values are separated by two dots.
- An asterisk (*) represents an indeterminate maximum value.
- In the case that the minimum and maximum values are the same, the number is displayed only once.
- In addition, zero or more (0… *) is also referred to as a simple asterisk (*) because it is common.
Finally, ranges and/or individual values can be separated by commas to list alternative values, i.e. 1..3, 5..8
Class Diagram Example