Download UML Guide
Transcript
navigability for the end that should not be referenced. Figure 5.6 shows how to make your selection. Setting an end to be not navigable adds an arrow to the opposite end—so that it appears as a one-way path between the elements. The end without an arrowhead is not navigable (cannot be referenced by the other end). Figure 5.8 illustrates the both types of end points. Figure 5.8 Association End: Arrowhead used for Navigability FridgeSimulation is not navigable (known about) by FridgeModel FridgeModel is navigable (known about) by FridgeSimulation In this example of navigability, the FridgeSimulation can refer to the FridgeModel, but the FridgeModel knows nothing about the FridgeSimulation. ❏ 5-8 Multiplicity Association ends can also show multiplicity, which indicates the number of objects of one class that are associated with an object in another class. For example, you can specify that a refrigerator has two doors, or that a thermostat is associated with x number of temperature sensors. You can choose not to specify multiplicity at all, signifying either that it is unimportant or it is undetermined. To specify a value, right-click the association and follow the steps in Figure 5.9. The various ways of specifying multiplicity are described below. • Any number (including zero) Use an asterisk (“*”) to show that you can have any number of class or interface objects associated with that association end. • A specific number Enter an exact number of class or interface objects associated with that association end. For example, you can specify that your refrigerator has two doors by entering “2” for the association end near the Doors class.