foreword
The static diagram shows the static structure of the system, especially the internal structure of the types of things and the connections between them. It mainly includes class diagram, object diagram and package diagram.
Class Diagram
1. The class diagram describes a static relationship, is the presentation of the static part of the system, and is valid throughout the life cycle of the system.
2. The class diagram contains 7 elements: class, interface, collaboration, dependency, generalization, implementation and association. Now let's focus on the relationship.
Dependency (some change to one element (provider) may affect or provide messages to other elements (client)) generalization (a taxonomic relationship that exists between general and special elements) association (object of one thing is related to another The relationship between the objects of a thing, there are 6 modifiers applied to the association)
1. Name
2. Role
3. Multiplicity
4. Aggregation (not having the same lifetime)
5. Composition (having the same lifetime)
6. Navigability (one object navigates through the chain to access another) Implementation (specs and The relationship between its implementations, connecting a model element with another model element) 1. Between an interface and a class that implements the interface 2. Omit representation of the implementation relationship
object graph
1. Describe the state of each object participating in an interaction at a certain moment in the interaction process, which is the presentation of the system at a certain moment. It can be seen as an instance of the class diagram at a certain moment in the system.
package diagram
1. The package diagram is composed of the relationship between packages and packages. It is an important modeling tool for maintaining and controlling the overall structure of the system.
example
Summarize
In the analysis phase, we need to clarify the details of the problem, and we can use class diagrams to describe the static structure; in the design phase, we need to give specific solutions, we can use class diagrams and package diagrams to design the interface of the class.