Tutorials > UML modeling for information system architecture > Module 3: Create class diagrams > Lesson 3.2: Add an association between classes
  
Lesson 3.2: Add an association between classes
Build relationships between classes by adding an association line.
In the UML Sequence diagram, you established that some of your objects are sending messages to one another. In the scope of the class diagram, there should be respective associations between the classes that these objects instantiate. At this point you want to graphically show that these relationships exist. Later, depending on the implementation language, you want to specify the nature of these relationships (for example, in C++ a class can reference another class, or point to it; in Java, pointing does not exist, but a class can reference another).
In the Sequence diagram, you modeled that Diary creates Reservation. It might also cancel it (you would model that in another Sequence diagram) or update its status. You can say Diary Maintains Reservation.
Select Straight - Orthogonal Line Style
Note System Architect offers a number of line styles to select when drawing a line. For this exercise, draw using the Straight, Orthogonal choice. You can switch later to Straight - Any Orientation.
1 Select Format > Symbol Format > Line.
2 In the Line Style dialog, toggle Straight - orthogonal and click OK.
To add an association to the diagram
1 Select the Association line tool from the toolbar, and draw a line from the class Diary to the class Reservation (it is important to draw it in this order). Remember, you must start with a plus line (+) on the first symbol, release your mouse, and end with a plus line on the second symbol. Name the line Maintains and press Enter.
2 Move the Maintains name to the right so that it is not covering the line.
This graphic is described in the surrounding text.
Next
Lesson 3.3: Define an association
See also
Module 3: Create class diagrams