Toolkit 1.1
Creating Class Diagrams

Diagrams

 

Making a Class Diagram

Open the toolkit as explained earlier and select the Class tab.

A class diagram is essentially an entity-relationship diagram, where the entities are class with names, attribute and actions. Class diagrams incorporate certain types of relations, including Generalization, Association and Aggregation. The tool kit has a tool bar which features all the elements that can be used to make a use case diagram.

Working with the Class Diagram Elements

Click on each tab in the tool bar to see all the symbols that the tool kit supports.

First click on the class  tab and then click on the white screen, You will notice an class element on the screen. Similarly try clicking all the element on the tool bar and put them on the screen. Your screen should look like this:

Notice:

  1. The properties applet changes for every element, showing mainly the color, dimensions, HTML link and Graph link. The class, package and interface elements have more properties such as the name and color.

  2. The properties can be changed by changing the text in the respective text areas. Notice the changes appearing on the screen.

Changing the Size of the elements

Click on the element, you will notice small green boxes on the edges of the selected element. Click on those boxes and simultaneously drag the mouse to adjust its size according to your use.

Changing the Properties of a Class Element?

  1. Click on the class tab on the tool bar and then click on the blank screen. You will notice a class element named 'class' with one row and three columns.
  2. Now select the this class element and you will notice that a 'name' text area in the property applet. Select the text area and enter the name of the class according to you model. Let us select  'Account' as the class name and hit the enter key.
  3. You can also change the color of this class element. Notice that next to the color property text area there is a selection icon. On clicking the icon, a color palette will be displayed. Select the color of your choice. If you select red you screen should look like this:

Using Generalization Relationships

Generalization relationships identify classifiers that share common elements, and are shown by a line with an unfilled whose apex points to a more general classifier. A super class generalizes a subclass.

Example:
A "Checking Account" and "Saving Account" classes specialize the upper level "Account" class

  1. Continue making on the same screen. Click the class icon from the tool bar and click the screen. Repeat the same procedure again.

  2. Change the name of the two new classes to "Checking" and "Saving" using the property applet.

  3. Now select the 'Generalization' icon from the tool bar and place it on the screen according to your class diagram.

  4. Click on the yellow or green box to increase the size or change direction.

Making Aggregation and Composition Hierarchies

These are whole/part relationships.

  1. Select the class icon on the tool bar and click on a new blank screen. Repeat the process 5 times and arrange the class elements as shown below.

  2. Also change the names of the classes using the property applet as to what is seen in the figure below.


  3. Now click on the "Aggregation' icon and place it below the 'Class Whole' class. 

  4. Adjust the size and position by using the small yellow, red and green box that appear when you select the aggregation element.

  5. Follow the same procedure to make the "Composition" element.