Packages and Namespaces - Package Notation - Package and Their Contents

6 important questions on Packages and Namespaces - Package Notation - Package and Their Contents

How do we show the package if we do want to show the contents?

If we do want to show the contents of the Package, we replace the centered name with the diagram Elements that we wish to depict.

The name goes to the tab

The Package is a ..... And can display many other .... ?

As a VIEW, the Package can display many other Elements from the Package, not currently shown in the figure, at the option of the modeler.

What is also a Namepace?

A Class is also a Namespace.

It has a set of attributes (see the class symbol, Book, inside the figure), each with a name.

Moreover, no duplicate names are allowed for attributes nor operations (under most circumstances).

The attributes and operations are MEMBERS of the Class, as the Elements within a Package are members of the Package.
  • Higher grades + faster learning
  • Never study anything twice
  • 100% sure, 100% understanding
Discover Study Smart

What is a third way to show a package? And what is it's benefit?

A third way of displaying a Package gives the modeler more flexibility in arranging the diagram.

In this approach, as shown in Fig. 8.3, we use the (rondje met plusje)  symbol to connect the Package symbol to the owned Elements

All these Package Diagrams show the model Elements defined and owned by the Package.

As an Element can only be defined once in a model, there is no ...... on these diagrams.

The connecting line is not an ..... ; it is just shorthand for the direct incorporation approach.

All these Package Diagrams show the model Elements defined and owned by the Package.

As an Element can only be defined once in a model, there is no multiplicity on these diagrams.

The connecting line is not an association; it is just shorthand for the direct incorporation approach.

UML has one more way of representing a Package and its member Elements—Reminiscent of a Class showing its own members.

What is this?


We can show the Package with an internal list of members as done in Fig. 8.4.

We added another Package, YourPackage, as a new member of MyPackage.

The question on the page originate from the summary of the following study material:

  • A unique study and practice tool
  • Never study anything twice again
  • Get the grades you hope for
  • 100% sure, 100% understanding
Remember faster, study better. Scientifically proven.
Trustpilot Logo