+49 (30) 467086-20 service@microtool.de
Products » objectiF RM » Requirements Engineering » Diagrams » The Class Diagram

The Class Diagram

A class diagram is used to model classes, interfaces and their relationships using UML (Unified Modeling Language). The diagram visualizes messaging pathways between classes as aggregations and associations. It shows the inheritance of properties and behaviors between classes as generalizations.

Class diagrams are created:

  • in the context menu of a package with the command Create diagram/ Class diagram…
The diagram

The most important editing functions

  Create Class This button creates a class and adds it to the diagram. A class describes a group of objects that are characterized by the same properties (attributes) and that have identical methods, have similar relationships to other objects and serve a common semantic purpose. In the class diagram, the collapsed view of the class symbol displays its name and its stereotype. The expanded view of the symbol additionally shows compartments with class elements. Use the small triangle to switch between collapsed and expanded views.
  Add Class Adds existing classes to the diagram.
  Create Generalization Links two classes by a generalization. Select the generic class first and then the specialized class. A generalization visualizes a relationship between a generic and specialized class. The specialized class inherits the properties and behavior of the generic class and also has additional properties and behavior. A generalization is indicated by a blue line with an arrow. It is a dashed line, if the super-class is an interface. The arrow points in the direction of the super-class.
 

Create Aggregation Creates a composition or an aggregation between two classes. Select the aggregate class first and then the part class. A composition is created as a default. The type of relationship can be changed in the Properties context menu. An aggregation is defined as a “consists of” relationship between an aggregate class and its part classes. An aggregation is indicated in a class diagram using a solid red line. The line ends at the side of the aggregate class with an empty diamond symbol. The line indicating the aggregation displays the multiplicity and role name.

Create Composition A composition is a special kind of aggregation in which the life span of the parts is connected to that of the whole. If the aggregate class is deleted, the part class is deleted along with it. A part class can only exist as a part of the whole aggregate class. A solid red line is used for the link that indicates a composition. In order to distinguish graphically between a composition and the “normal” aggregation, the red line ends in a solid diamond at the side of the aggregate class.

  Create Association Creates an association between two classes. An association represents a semantic relationship between two classes. It indicates that the objects of one class communicate with the objects of another class. In a class diagram, an association is drawn with a solid green line. The multiplicity and role names are displayed at the end of the line.
  Create Dependency Links two classes by a dependency. Select the dependent class (source class) first and then the class in use (target class). Dependency expresses that one class requires another class for its specification or implementation. The stereotype is displayed above the link. The default stereotype for a dependency is «Dependency». The dependency type can be changed using further stereotypes. The line indicating the dependency is dashed and ends with an arrow pointing in the direction of the independent class.
  Create Extend Relationship Links two classes by an extend relationship. The extend relationship lets you add new component functions and elements to the diagrams, dialog boxes and context menus of the tool in use.
  Satisfy Relationship Links a requirement to the class that must fulfill it. Select the requirement first and then the class that satisfies the requirement. A satisfy relationship documents which class or classes, satisfy or implement a requirement.
  Create Note Used to create a note to provide additional information about the chart or chart element.
  Create Note Relationship links a note to another chart element.