Working with Class Diagrams

To create a Class Diagram:

  1. First select an element where a new Class Diagram to be contained as a child.
  2. Select Model | Add Diagram | Class Diagram in the Menu Bar or select Add Diagram | Class Diagram in Context Menu.

In Class Diagram, you can use following elements.

See also

UML Class Diagram
For more information about UML Class Diagram.

Class

To create a Class:

  1. Select Class in Toolbox.
  2. Drag on the diagram as the size of Class.

To create a Class (model element only) by Menu:

  1. Select an Element where a new Class to be contained.
  2. Select Model | Add | Class in Menu Bar or Add | Class in Context Menu.

To edit a Class, you can do following actions:

To suppress Attributes, see Suppress Attributes.

To suppress Operations, see Suppress Operations.

To hide Operation signatures, see Show Operation Signature.

Attribute

To add an Attribute:

  1. Select a Classifier.
  2. Select Model | Add | Attribute in Menu Bar or Add | Attribute in Context Menu.

To edit an Attribute, you can do following actions:

Operation

To add an Operation:

  1. Select a Classifier.
  2. Select Model | Add | Operation in Menu Bar or Add | Operation in Context Menu.

To edit an Operation, you can do following actions:

To hide Operation signatures, see Show Operation Signature.

Parameter

To add a Parameter:

  1. Select an Operation.
  2. Select Model | Add | Parameter in Menu Bar or Add | Parameter in Context Menu.

Template Parameter

To add a Template Parameter:

  1. Select an Element.
  2. Select Model | Add | Template Parameter in Menu Bar or Add | Template Parameter in Context Menu.

To edit an Template Parameter, you can do following actions:

Interface

To create an Interface:

  1. Select Interface in Toolbox.
  2. Drag on the diagram as the size of Interface.

To create an Interface (model element only) by Menu:

  1. Select an Element where a new Interface to be contained.
  2. Select Model | Add | Interface in Menu Bar or Add | Interface in Context Menu.

To edit an Interface, you can do following actions:

To show an Interface as Lollipop notation, Interface should be realized (See Interface Realization) and then change Stereotype Display to Icon or Icon with Label (See Stereotype Display).

To show an Interface as Socket notation, Interface should have dependants (See Dependency) and then change Stereotype Display to Icon or Icon with Label (See Stereotype Display).

To suppress Attributes, see Suppress Attributes.

To suppress Operations, see Suppress Operations.

To hide Operation signatures, see Show Operation Signature.

Generalization

To create a Generalization:

  1. Select Generalization in Toolbox.
  2. Drag from an element (to be special) and drop on another element (to be general).

Association

To create an Association (or Directed Association):

  1. Select Association (or Directed Association) in Toolbox.
  2. Drag from an element and drop on another element.

Aggregation

To create an Aggregation:

  1. Select Aggregation in Toolbox.
  2. Drag from an element (to be a part) and drop on another element (to be whole).

Note

Aggregation is an association whose aggregation propery is shared.

Composition

To create a Composition:

  1. Select Composition in Toolbox.
  2. Drag from an element (to be a part) and drop on another element (to be whole).

Note

Composition is an association whose aggregation propery is composite.

Dependency

To create an Dependency:

  1. Select Dependency in Toolbox.
  2. Drag from an element (client) and drop on another element (supplier).

Interface Realization

To create an Interface Realization:

  1. Select Interface Realization in Toolbox.
  2. Drag from an element (realizing) and drop on an interface (to be realized).

Signal

To create a Signal:

  1. Select Signal in Toolbox.
  2. Drag on the diagram as the size of Signal.

To create a Signal (model element only) by Menu:

  1. Select an Element where a new Signal to be contained.
  2. Select Model | Add | Signal in Menu Bar or Add | Signal in Context Menu.

To edit a Signal, you can do following actions:

DataType

To create a DataType:

  1. Select DataType in Toolbox.
  2. Drag on the diagram as the size of DataType.

To create a DataType (model element only) by Menu:

  1. Select an Element where a new DataType to be contained.
  2. Select Model | Add | DataType in Menu Bar or Add | DataType in Context Menu.

To edit a DataType, you can do following actions:

PrimitiveType

To create a PrimitiveType:

  1. Select PrimitiveType in Toolbox.
  2. Drag on the diagram as the size of PrimitiveType.

To create a PrimitiveType (model element only) by Menu:

  1. Select an Element where a new PrimitiveType to be contained.
  2. Select Model | Add | PrimitiveType in Menu Bar or Add | PrimitiveType in Context Menu.

To edit a PrimitiveType, you can do following actions:

Enumeration

To create an Enumeration:

  1. Select Enumeration in Toolbox.
  2. Drag on the diagram as the size of Enumeration.

To create an Enumeration (model element only) by Menu:

  1. Select an Element where a new Enumeration to be contained.
  2. Select Model | Add | Enumeration in Menu Bar or Add | Enumeration in Context Menu.

To edit a Enumeration, you can do following actions:

To suppress Literals, see Suppress Literals.

Enumeration Literal

To add an Enumeration Literal:

  1. Select a Classifier.
  2. Select Model | Add | Enumeration Literal in Menu Bar or Add | Enumeration Literal in Context Menu.

To edit an Enumeration Literal, you can do following actions:

AssociationClass

To create an Association Class by linking two Classifiers:

  1. Select Association Class in Toolbox.
  2. Drag from an element and drop on another element.
  3. An Association and a Class connected to the association will be created.

To create an Association Class by linking Association and Class:

  1. Select Association Class in Toolbox.
  2. Drag from an Association (or Class) and drop on a Class (or Association).
  3. The Class will be connected to the Association.