Microsoft Visio 2002 – UML Model Diagram

1.  General interface

Standard Toolbar

Format bar

2.  Class diagram

1)  On the File menu, point to New, point to Software, and then click UML Model Diagram.

2)  In the Model Explorer, right-click the package in which you want to include the class diagram, point to New, and click Static Structure Diagram.

3)  A blank page appears, and the UML Static Structure stencil becomes the top-most stencil. The workspace displays 'Static Structure' as a watermark. An icon representing the diagram is added to the model explorer.

Note: If the model explorer isn't visible, point to View on the UML menu, and then click Model Explorer.

4)  Drag class shapes onto the drawing page to represent the classes you want to include in your class diagram.

5)  Double-click each shape to open its UML Properties dialog box, where you can add attributes, operations, and other properties.

6)  Right-click each class shape, and then click Shape Display Options to select which properties to display on the shape and which compartments of the shape to suppress (such as attributes, operations, and template parameters).

7)  Indicate relationships between the classes and objects using Association, Link, Dependency, Generalization, or Composition shapes.

8)  Double-click each relationship shape (Association, Link, Dependency, Generalization, or Composition) to open its UML Properties dialog box, where you can add association end adornments and other properties.

9)  Save class diagram by clicking the Save icon in the toolbar.

3.  Use Case diagram

1)  On the File menu, point to New, point to Software, and then click UML Model Diagram. (This step could be omitted if the model has been set up previously.)

2)  In the Model Explorer, right-click the package or subsystem in which you want to include a use case diagram, then point to New, and then click Use Case Diagram.

3)  A blank page appears, and the UML Use Case stencil becomes the top-most stencil. The workspace displays 'Use Case' as a watermark. An icon representing the diagram is added to the tree view.

Note: If the model explorer is not visible, on the UML menu, point to View, and then click Model Explorer.

4)  Drag the System Boundary shape onto the drawing page.

5)  Drag Use Case shapes from the Use Case stencil and place them inside the system boundary, and then drag Actor shapes to the outside of the system boundary.

6)  Use Communicates shapes to indicate relationships between use cases and actors.

7)  Use Uses and Extends shapes to indicate the relationships between use cases.

8)  Right-click each shape, and then click Shape Display Options to select which properties to display on the shape and which compartments of the shape to suppress (such as attributes, operations, and template parameters).

9)  Double-click any shape (except the System Boundary shape) to open its UML Properties dialog box where you can add a name, attributes, operations, and other property values.

10) Save the diagram.

4.  Tips

1) Seek help from Microsoft: Key in “UML” in the help box (northeast part of the screen) and press “Enter,” then select “About the UML modeling environment in Microsoft Visio.” Microsoft Help will tell you how to create UML diagrams step by step.

2) View sample UML diagrams: On the File menu, point to New, click Browse Sample Drawing…, and then in the file open dialog, select Championzone UML in the software subdirectory.

Xin Tan 5