Package diagram
The role of the package
Logically modularize a complex diagram and organize the source code
Package symbol
Elements of the package
Classes, interfaces, components, use cases, other packages, etc.
It should be noted that: 1. If the package is revoked, the elements in it are also revoked.
2. Various modeling elements of the same type in a package cannot have the same name.
3. In the same package, different types of model elements may have the same name.
The relationship between packages:
Dependency:
The change of one model element affects another model element, there is a dependency between the two elements. If there is a dependency between any two classes in two packages, then there is also a dependency between the two packages.
For these two packages, if the modification of the elements in package B leads to changes in package A, then package A is said to depend on package B. As shown below.
Generalization relationship:
The generalized relationship describes: the relationship between a thing and a special kind of the thing, that is, the relationship between parent elements and child elements.
Object graph
Object diagram description: A diagram of a group of objects and the relationships between them at a certain moment. It can be regarded as the static structure of the class diagram at a certain moment in the system. The class diagram describes all possible situations. The object diagram is the display of the system at a certain moment.
The focus of the object diagram is the object. That is, the operation of different objects. The computer room charging system can be divided into three objects, namely general users, administrators and operators. The operation of these three objects is three object graphs.