Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Class Diagram

Step 1 Create a new project named Sample

Step 2 Click New Package button in the project explorer window and create a view.

Step 3 Click New Package button and create a new package under view.

Prepared by: J.Chandra Priya, TF, DCT, MIT.


Step 4 To Create a Class Diagram. Select Diagram Type as Class press OK button

Step 5 Create a package by dragging and dropping the package element from the toolbox.

Prepared by: J.Chandra Priya, TF, DCT, MIT.


Step 6 Select the diagram type as Class from New Diagram window and click OK button.

Prepared by: J.Chandra Priya, TF, DCT, MIT.


Step 7 Double click on the Class Model package element and create a class element Employee by
dragging and dropping the Class element from the toolbox.

Prepared by: J.Chandra Priya, TF, DCT, MIT.


Step 8 Right click on the class element Employeeand select Features & Properties > Attributes (or)
Operations menu to create attributes and operations for the Employee class.

Employee Attributes window is used to add attributes.

Prepared by: J.Chandra Priya, TF, DCT, MIT.


Employee Operation window is used to add operations.

Prepared by: J.Chandra Priya, TF, DCT, MIT.


Prepared by: J.Chandra Priya, TF, DCT, MIT.
Step 9 Create an interface (User) by dragging and dropping the Interface element from the toolbox. Use
the Realization connector from the quick linker or toolbox to create a realization relationship between
Employee class and User interface.

Step 10 Create a Data Type element, Table element and create a relationship using Association
connector either by using quick linker or by using toolbox.

Prepared by: J.Chandra Priya, TF, DCT, MIT.


Step 11 Create an Enumeration element, Primitive Type element and create a relationship using
Dependency connector either by using quick linker or by using toolbox.

Step 12 Create a Signal element, Association element and create a relationship using Association
connector either by using quick linker or by using toolbox.

Prepared by: J.Chandra Priya, TF, DCT, MIT.


Step 13 Create two more class elements and create a relationship using Aggregation connector either by
using quick linker or by using toolbox.

Step 14 Similarly Aggregate connector is used either by using quick linker or by using toolbox.

Prepared by: J.Chandra Priya, TF, DCT, MIT.


Step 15 Final model will be displayed as shown below.

Prepared by: J.Chandra Priya, TF, DCT, MIT.

You might also like