16.2 Subsystems and the Class Diagram


Each class belongs to exactly one subsystem. Draw a class diagram for each subsystem.

Of course, classes are related to classes in other subsystems. For example, the Shopping Cart in the Ordering subsystem is associated with the Product in the Product Specification subsystem.

When a class in one subsystem has an association with a class in another subsystem, show the imported class using only the name of the class with either an annotation "imported from <subsystem name>," or a stereotype «imported», as shown in Figure 16.2.

Figure 16.2. An Imported Class on a Class Diagram

graphics/16fig02.gif

Place the association in only one of the subsystems; do not also create the Product Shopping Cart association in the Product Specification subsystem. That would be redundant. Describe the association between the classes in different subsystems in the same manner as described in Section 6.2: Association Descriptions.

All the associations between classes in different subsystems can be summarized on a package diagram, as shown in Figure 16.3. To depict the relationship between subsystems, show a bidirectional dependency between the subsystems and label it with the names and numbers of the associations that span the subsystems.

Figure 16.3. A Package Diagram Showing Spanning Relationships Between Subsystems

graphics/16fig03.gif

Naming and numbering conventions.

One technique for organizing the classes and relationships in different subsystems is to use subsystem prefixes for class numbers, class names/abbreviations, relationship numbers, and signal names. See Figure 16.4 for an example.

Figure 16.4. Subsystem Prefixes as Naming and Numbering Conventions

graphics/16fig04.gif



Executable UML. A Foundation for Model-Driven Architecture
Executable UML: A Foundation for Model-Driven Architecture
ISBN: 0201748045
EAN: 2147483647
Year: 2001
Pages: 161

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net