Objectoriented modeling Package diagrams Karolina Muszyska Based on

Object-oriented modeling Package diagrams Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2. 0 w modelowaniu SI”

Object Modeling � Organizing diagrams ◦ ◦ and grouping - package role basic concepts advanced concepts examples 2

Package Diagrams –role �Package diagram is a graphical representation of the logical structure of the system as a set of packages combined with dependencies and decomposed. These diagrams are used for grouping and organizing complex project documentation. 3

Package Diagrams –basic concepts �Package - a general-purpose mechanism that is used to organize the elements of a group. Package may include a variety of UML classifiers, complete diagrams, class libraries, subsystems, models or templates. �Dependency - the basic way to combine packages into a logical structure, which results in creation of package diagrams �Package nesting/decomposing – a natural way to organize packages, which can be multilevel 4

Package Diagrams –basic concepts Dependency Package 5

Package Diagrams –basic concepts Nesting/Decomposition 6

Package Diagrams – advanced concepts �Stereotyping of packages: ◦ model stereotype ◦ subsystem stereotype ◦ template stereotype ◦ class library stereotype �Stereotyping of dependencies: ◦ import ◦ merge ◦ access 7

Package Diagrams – advanced concepts �Model stereotype - describes the packages that are models; common model stereotype packages represent use cases models, business models and analytical models �Subsystem stereotype - is useful in modeling systems decomposed into hierarchically ordered packages �Template stereotype - describes a package which is model solutions to problems in a given field �Class library stereotype - describes a package which groups system components to be used by other packages 8

Package Diagrams – advanced concepts �Import stereotype - describes commonly used dependency, meaning inclusion of classifiers, which are inside the target package into the source package during the operation of the system �Merge stereotype - leads to merging of classifiers which are inside the target package with the classifiers included in the source package; such merging dependency means that the classifiers from the source package inherit from the target package, but only within the classifiers of the same type, identical names, with "public" visibility �Access dependency - means that the source package can access the contents of the target package without physical download of data 9

Package Diagrams – advanced concepts Dependency stereotypes 10

Package Diagrams – advanced concepts Subsystem stereotype Dependency stereotypes 11

Steps of creating a package diagram � identification and labeling of packages � classification of identified packages using appropriate stereotypes, � identification of packages nesting/ decomposition, � combining packages using dependencies, � specification of dependencies by giving them appropriate stereotypes 12

Package diagrams examples 13

Package diagrams examples 14
- Slides: 14