- Introduction
- 16.1 Applying UML: Common Class Diagram Notation
- 16.2 Definition: Design Class Diagram
- 16.3 Definition: Classifier
- 16.4 Ways to Show UML Attributes: Attribute Text and Association Lines
- 16.5 Note Symbols: Notes, Comments, Constraints, and Method Bodies
- 16.6 Operations and Methods
- 16.7 Keywords
- 16.8 Stereotypes, Profiles, and Tags
- 16.9 UML Properties and Property Strings
- 16.10 Generalization, Abstract Classes, Abstract Operations
- 16.11 Dependency
- 16.12 Interfaces
- 16.13 Composition Over Aggregation
- 16.14 Constraints
- 16.15 Qualified Association
- 16.16 Association Class
- 16.17 Singleton Classes
- 16.18 Template Classes and Interfaces
- 16.19 User-Defined Compartments
- 16.20 Active Class
- 16.21 Whats the Relationship Between Interaction and Class Diagrams?
16.21 What’s the Relationship Between Interaction and Class Diagrams?
When we draw interaction diagrams, a set of classes and their methods emerge from the creative design process of dynamic object modeling. For example, if we started with the (trivial for explanation) makePayment sequence diagram in Figure 16.21, we see that a Register and Sale class definition in a class diagram can be obviously derived.
Thus, from interaction diagrams the definitions of class diagrams can be generated. This suggests a linear ordering of drawing interaction diagrams before class diagrams, but in practice, especially when following the agile modeling practice of models in parallel, these complementary dynamic and static views are drawn concurrently. For example, 10 minutes on one, then 10 on the other.
Guideline: A good UML tool should automatically support changes in one diagram being reflected in the other. If wall sketching, use one wall for interaction diagrams, and an adjacent wall for class diagrams.
Figure 16.21 The influence of interaction diagrams on class diagrams.