|
||
|
|
Basic object modeling: constraints |
|
Objective |
Define constraints as they apply to basic object modeling. | |
| Any rules that cannot be expressed in the name or in the multiplicity may be added as a constraint. Place the rule description within curly brackets {} at the end of the association controlled by the rule. | ||
| Constraints Example
In the previous example, we chose "a point in time" as our time frame. For this example, let's change the time frame to include history.
Now ask "How many customers can hold the same seat over the life of the system?" In this case, the answer would be "only one at the same time, but many over a period of time." This multiplicity would be represented as 0..*: zero to many customers may hold the same seat over time.
|
||
|
Object Modeling Constraints Exercise
Click the Exercise button to draw class diagrams based on excerpts from the course project problem statement. Object Modeling Constraints Exercise |
||
|
|
||