HOPEX UML : HOPEX UML : Structure and Deployment Diagrams : The Package Diagram : Creating a Package Diagram
   
Creating a Package Diagram
A package diagram is created from a package. For package creation, see "Creating a Use Case Diagram".
To create a package diagram:
1. In the Main Objects navigation window, right-click a package name.
2. In the pop-up menu that appears, select New > Diagram.
A dialog box opens listing the possible diagram types.
3. Select "Package Diagram" and click Create.
Defining Packages
A package partitions the domain and the associated work. It is used to organize elements into groups, particularly use cases and classes. Packages may be nested within other packages. Packages are linked by contractual relationships that define their interface.
Examples of packages:
The commercial information system.
Accounting.
Production management.
Digital control of a machine.
Inventory management.
Alarm system and telephone management.
To add in the diagram an existing package:
1. Int he package diagram, click the Package button in the insert toolbar, then in the workspace.
2. In the Add Package dialog box, select List in the drop-down list box using the arrow .
The list of packages appears:
3. Select the desired package and click OK.
The name of the diagram appears in the Add UML Package dialog box.
4. Click Add.
The package appears in the diagram.
Defining Classes
The package diagram can be used to place classes in different packages.
To add classes to the package diagram:
1. Search for the classes already created by clicking the query button of MEGA bar.
2. In the dialog box that opens, select the target "Class".
 
3. Click Find.
The list of classes opens:
4. Select the classes you want and drop them in the diagram.
Specifying Dependencies in a Package Diagram
Links allow you to indicate if a package contains or references a class or another package.
To indicate that a package references a class or another package:
1. Click the button.
2. Then create the link from a package to the package or class that it references.
A dialog box asks you the type of link to be created.
3. Select "Referenced package" or "Referenced class" as required.