Class Diagram

Class diagrams are probably the most important diagrams of UML. They can be used for various purposes and at different times in the development life cycle. Class diagrams are often applied to analyze the application domain and to pin down the terminology to be used. In this stage they are usually taken as a basis for discussing things with the domain experts, who cannot be expected to have any programming nor computer background at all; therefore, they remain relatively simple like this typical example, the Entity Class Model Overview Class Diagram.

Please note that graphical elements have been added to this diagram simply to highlight different regions.

Figure 10-1. A Class diagram.

Once the domain has been established, the overall architecture needs to be developed. Class Diagrams are used again, but now implementation-specific classes are expressed in addition to the terms of the domain.

If a class is shown in a diagram of a different package, the text (from package.subpackage) is displayed just under the class name in the diagram. You can turn it off with the Context menu of the class. Move the mouse over the class, right-click, and select Display - Hide Package display.

Diagram Elements

Toolbar

Select

Add or remove space between elements

Class

Package

Actor

Actor as Classifier

Generalization

Dependency

Association

Directed Association

Aggregation

Composition

Association Class

Interface

Interface as Circle

Realization

Lollipop

Socket

Collaboration

Classifier Role

Attribute

Operation

Comment

Connect Comment to Element

Text

Circle

Rectangle

Polygon

Polyline

Repaint the diagram

Do layout

Update layout

Zoom to 100%

Zoom to Fit

Zoom to Selection