Packages group related model elements of all types, including other packages.
You can group model elements in packages for the following reasons:
  • Organize the model elements so that the model is easier to understand and to navigate in the Project Explorer.
  • Model the architecture of your system by using packages to represent the various layers or subsystems

Packages also represent namespaces, which means that the model elements within a package must have unique names. For example, if you validate a model that has an actor named Customer and a class named Customer in the same package, you will receive a warning that conflicting names appear in the same package. To prevent the warning, you can put the Customer actor in another package.

You can use packages in several diagrams, including class, component, and use-case diagrams. Each package has a unique name that describes its content.

As the following figure illustrates, a package is displayed as a rectangle with a tab in the upper-left corner. The rectangle contains the name of the package and the package icon.

A package shape as described in the preceding paragraph.
Note: The package shape also represents models and subsystems. In this case, a keyword or graphic symbol is displayed in the package shape.