Visual Modeling with Rational Rose 2002 and UML (3rd Edition)
I l @ ve RuBoard |
If a system contained only a few classes, you could manage them easily. Most systems are composed of many classes, and thus you need a mechanism to group them together for ease of use, maintainability, and reusability. This is where the concept of a package is useful. A package in the logical view of the model is a collection of related packages and/or classes. By grouping classes into packages, we can look at the "higher" level view of the model (i.e., the packages) or we can dig deeper into the model by looking at what is contained by the package. Each package contains an interface that is realized by its set of public classesthose classes to which classes in other packages talk. The rest of the classes in a package are implementation classesclasses do not communicate with classes in other packages. If the system is complex, packages may be created early in the Elaboration Phase to facilitate communication. For simpler systems, the classes found early in analysis may be grouped into one packagethe system itself. As analysis and design progress, the concept of a package will be used to group the classes that are needed to carry out the architectural decisions made for the system. In the UML, packages are represented as folders. A package is shown in Figure 4-7. CREATING PACKAGES IN THE ROSE BROWSER
Figure 4-7. UML Notation for a Package
A package created via the browser is shown in Figure 4-8. Figure 4-8. Package Created in the Browser
As packages are created, classes in the model are relocated . RELOCATING CLASSES IN THE ROSE BROWSER
Relocated classes are shown in Figure 4-9. Figure 4-9. Relocated Classes
|
I l @ ve RuBoard |