|
||
Lesson 9
Objective
|
Basic object modeling: multiplicity
Define multiplicity as it applies to basic object modeling. |
|
| Multiplicity
To complete each association, you need at least to assign multiplicity . Multiplicity
simply means the number of objects that participate in the association. Assign two separate values, one at each end of the
association. Ask the question "How many objects of this class are associated with one object of the other class?" Then
switch to the other end of the association and ask the question again.
An example of multiplicity
Using the course project example again, you would ask "How many seats can be held by one customer?" If the answer is none
or a lot, show this by placing the multiplicity 0..* on the Seat end of the holds association.
To answer this question, you have to choose a time frame. Remember the three questions used for abstraction.
Let us go with a point in time for this example. In that case, the answer would be "one at a time." The multiplicity would be 0..1: No one or only one customer may hold the same seat at the same time.
|
||
|
|
||