When modeling a large scale system, you would probably be working with a high volume of model elements. They describe a model from different views and different phases, hence are in different types. UML package helps to organize and arrange model elements and diagrams into logical groups, through which you can manage a chunk of project data together. You can also use packages to present different views of the system's architecture. In addition, developers can use package to model the physical package or namespace structure of the application to build. With this, they follow the convention of naming package like using lower case for Java package.
| July 6, 2011 | |
User Rating:
/ 20
|
|
| Views: 28,883 | |
|
PDF
Link
Link: |
Add comments |
| Edition: Community or above (Edition comparison) | |
Package diagram visualizes packages and depicts the dependency, import, access, generalization, realization and merge relationships between them. Package diagram enables you to gain a high level understanding of the collaboration among model elements through analyzing the relationships among their parent package. This also helps explain the system's architecture from a broad view.

Here are some of the notations you can use in package diagram.
| Notation | Description |
|---|---|
| Package | Represents a group of model elements and/or diagrams. |
| Subsystem | A system that is part of a large scale system. |
| Dependency | When a package (e.g. client) requires another (e.g. supplier) for specification or implementation, a dependency would be established to model that. Dependency can also be found among model elements contained in packages. |
| Import | A relationship that shows the model elements in a package which are to be imported from another package. It allows a package to refer to a model element in another package without qualification. |
| Access | Model elements in a package that can be used by the model elements in another package but cannot be further imported from that package. |
| Generalization | A relationship that shows a package inheriting from another by sharing its properties and adding its own properties to produce a package with more specific specification. |
| Realization | An abstraction relationship between two packages showing that the supplier package provides specification while the client package implements it. |
| Merge | A relationship between two packages showing that their contents are to be combined. This should be used when elements in packages have the same name and represent the same concept. |
In this tutorial, we'll use Visual Paradigm for UML to model a simple system with several UML classes in it. We are going to create packages and move the classes into them. We'll also draw package diagram to show the relationships between packages.
Before starting this tutorial, you may want to familiarize yourself with the following resources.
Since we are using package with classes in the following example, let's begin by creating a few classes.
Note: In practice, you may use package with any type of model elements. There is no special requirement.

We now have four classes. Shape, Triangle and Ellipse belong to model, while Color is a type, required by the Shape class. In this section, we'll create two packages to group the four classes. There are many possible ways for you to create packages. One way is to create them directly in a class diagram containing the classes. In this tutorial, we'll try something different - creating package in the Model Explorer.



You can move model elements into a package through the Model Explorer via simple drag-and-drop. In this section, we'll move the classes into the appropriate packages.



Now, you can draw a package diagram to show the relationships among the classes from a high-level view, through modeling with their parent packages.





Click on one of the stars below to rate this article from 1 (lowest) to 5 (highest).
Comments (6)
written by tina on November 15, 2010
i have three packages"geometry, extent and relations". now i want to use these packages inside one package.. so i added all three packages inside a package but it do't make relation between them.. kindly help me in this regard..
written by tina on November 15, 2010
kindly provide a forums link in this website so that people can ask any question related to UML design and also provide chat room related to UML so that people can discuss there points and infact clear their problems..
written by Trevor Rose on June 9, 2011
This tutorial isn't all that useful, for the particular reason that it describes how to do something, without even remotely touching on WHY we are doing it and WHAT the result or influence of our actions are... if this is a typical example of your tutorials, then they are of little use to anyone, and you might as well remove them if you arent going to do them properly... they certainly wont be positively influencing your sales in any way i can guarantee you that (as someone who has sold software)
written by Jick Yeung on July 7, 2011
Hi Trevor Rose,
Thank you for your opinion. We have rewritten this page. The information is now more relevant. We will also review and correct the other pages.
Best regards,
Jick Yeung
written by Alex on September 22, 2011
Hi, why don't you consider doing short videos. I have gone through the tutorial above, twice now and can't see the point. In fact the software looks cumbersome the way it is presented, ie no clear drag and drop pallet. I am sure it is, but it just does not come across well
written by Jick Yeung on September 30, 2011
Dear Alex,
Thank you for your suggestion. We have prepared a video for this tutorial. Please watch at:
http://www.youtube.com/user/VisualParadigm?feature=mhee#p/a/u/0/BgvwzJnUt4A
Best regards,
Jick Yeung