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 DiagramPlace 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 SubsystemsNaming 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 |