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?
The name goes to the tab
The Package is a ..... And can display many other .... ?
What is also a Namepace?
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
What is a third way to show a package? And what is it's benefit?
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.
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