Technical Support
Have technical issues or suggestions? Please contact Visual Paradigm Support Team.
Sales Support
Have questions related to registration, licensing or payment? Feel free to contact Visual Paradigm Sales Team.
A class diagram shows the objects that are required and the relationships between them. Since it provides detailed information about the properties and interfaces of the classes, it can be considered as the main model and regard the other diagrams as supplementary models.
Right click Class Diagram on Diagram Navigator and select New Class Diagram from the pop-up menu to create a class diagram.
![]() |
| Create class diagram |
To create class, click Class on the diagram toolbar and then click on the diagram.
![]() |
| Create class |
A class will be created.
![]() |
| Class created |
To create association from class, click the Association -> Class resource beside it and drag.
![]() |
| Create association |
Drag to empty space of the diagram to create a new class, or drag to an existing class to connect to it. Release the mouse button to create the association.
![]() |
| Association created |
To create aggregation, use the Aggregation -> Class resource instead.
![]() |
| Create aggregation |
To edit multiplicity of an association end, right-click near the association end, select Multiplicity from the popup menu and then select a multiplicity.
![]() |
| Edit multiplicity |
To show the direction of an association, right click on it and select Presentation Options > Show Direction from the pop-up menu.
![]() |
| Show direction |
The direction arrow is shown beside the association.
![]() |
| Direction shown |
To create generalization from class, click the Generalization -> Class resource beside it and drag.
![]() |
| Create generalization |
Drag to empty space of the diagram to create a new class, or drag to an existing class to connect to it. Release the mouse button to create the generalization.
![]() |
| Generalization created |
To create attribute, right click the class and select Add > Attribute from the pop-up menu.
![]() |
| Create attribute |
An attribute is created.
![]() |
| Attribute created |
After creating an attribute, press the Enter key, another attribute will be created. This method lets you create multiple attributes quickly and easily.
![]() |
| Create attribute with Enter key |
To create operation, right click the class and select Add > Operation from the pop-up menu.
![]() |
| Create operation |
An operation is created.
![]() |
| Operation created |
Similar to creating attribute, you can press the Enter key to create multiple operations continuously.
To reorder a class member, select it and drag within the compartment, you will see a thick black line appears indicating where the class member will be placed.
![]() |
| Reorder class member |
Release the mouse button, the class member will be reordered.
![]() |
| Class member reordered |
To copy a class member, select it and drag to the target class while keep pressing the Ctrl key, you will see a thick black line appears indicating where the class member will be placed. A plus sign is shown beside the mouse cursor indicating this is a copy action.
![]() |
| Copy class member |
Release the mouse button, the class member will be copied.
![]() |
| Class member copied |
To move a class member, select it and drag to the target class, you will see a thick black line appears indicating where the class member will be placed. Unlike copy, do not press the Ctrl key when drag, the mouse cursor without the plus sign indicates this is a move action.
![]() |
| Move class member |
Release the mouse button, the class member will be moved.
![]() |
| Class member moved |
The model name completion feature enables quick creation of multiple views for the same class model. When create or rename class, the list of classes is shown.
![]() |
| Model name completion |
Type text to filter classes in the list.
![]() |
| List filtered by typed text |
Press up or down key to select class in the list, press Enter to confirm. Upon selecting an existing class, all class members and relationships are shown immediately.
![]() |
| Multiple views of the same model |
Continue to complete the diagram.
![]() |
| Completed diagram |
A generalization set defines a particular set of generalization relationships that describe the way
in which a general classifier (or superclass) may be divided using specific subtypes. To define a generalization set, select the generalizations to include, right click and select Generalization set > Create Generalization Set... from the popup menu.
![]() |
| Create a generalization set |
Name the set in the Manage Generalization Sets dialog box, and confirm by pressing OK.
![]() |
| Name the generalization set |
The selected generalizations are grouped. Adjust the connector to make the diagram tidy.
![]() |
| Adjust connector |
Repeat the steps for other generalizations.
![]() |
| Generalization sets defined |
When project's programming language is set to be Visual Basic or C#, it is possible to define delegate method for classes. To define delete method, right click on the class and select Stereotypes > Delegate from the pop-up menu.
![]() |
| Stereotype class as Delegate |
This applies to new classes that will be created in a project opened in specific workspace. To change the setting:
![]() |
| Show or hide operations |
This applies to classes in specific diagram. To change the setting:
![]() |
| Change the operations' presentation options for classes in diagram |
This applies to specific class. To change the setting:
![]() |
| Change the operations' presentation options for a class |
Instead of showing or hiding all members or public members, you may show/hide specific class member per class. To do this:
![]() |
| Show or hide specific class member |
![]() |
| Select Customized in dialog box |
![]() |
| Select attributes to hide |
Initial value can be set to an attribute, indicating the default value of the attribute when the owning object is instantiated. You can give a text value for initial value, or select an attribute of another class. To set initial value to an attribute:
![]() |
| Opening the attribute specification |
![]() |
| Selecting an initial value |
| NOTE: | In order to select the attribute of another class to be the default value, make sure the attribute you want to select is static (i.e. set to be in classifier scope) and is public (so that other classes can access). |
| Chapter 4. Structure Modeling | Table of Contents | 2. Drawing object diagrams |
Technical Support
Have technical issues or suggestions? Please contact Visual Paradigm Support Team.
Sales Support
Have questions related to registration, licensing or payment? Feel free to contact Visual Paradigm Sales Team.