Class Diagram
- A diagram describing a set of classes, interfaces, collaborations, and relationships between them, used to show the static structure of each class in a system
- Relationship between classes
- Rely on (dependency)
- Generalization (generalization)
- Connection (association)
- Implementation (realization)
1. The dependent (dependency)
- Dependency is a relationship of use in which changes to a particular thing may affect other things that use that thing. In most cases, dependencies occur when a method of one class takes an object of another class as an argument
- In UML, dependencies are represented by dotted lines with arrows, pointing from the dependent to the dependent
2. The generalization (generalization)
- Relationships between general elements and special elements
- The generalization relation is the inverse of the inheritance relation, in that the subclass inherits from the parent class, which is the generalization of the subclass
3. The connection (association)
-
Indicates that there is some semantic connection between two classes. One person works for a company, and a company has many offices
-
Associative relations are the semantically weakest of all relations
-
Can be divided into aggregation relation, combination relation
-
Aggregation relation: a special case of association relation, strong association relation. Aggregation means that the relationship between classes is whole and part, but whole and part are separable and can have their own life cycle. In UML, a solid line with a hollow diamond
-
Combinatorial relation: also a special case of associative relation, this relation is stronger than aggregation, also called strong aggregation; It also reflects the relationship between the whole and part, but the whole and part are inseparable at this time, and the end of the life cycle of the whole means the end of the life cycle of the part. In UML, a solid line with a solid diamond
4. Implementation (realization)
- An implementation relationship is formed when one element performs an operation on another element
- Such as interface classes and their implementation; An interface is a collection of operations that only declare the operation method (it is not implemented), and the implementation class defines the implementation part
2. Object Diagram
- Describes the state of each object participating in an interaction at a certain point in the interaction. An object diagram can be thought of as an instance of a class diagram at one point in time
- In UML, object diagrams use the same notations and relationships as UML class diagrams because objects are instances of classes
3. The state chart diagram shows that
- A state diagram is used to describe all possible states of a particular object and the events that cause the state transition
- It consists of states, transitions, events, and activities
- A state diagram gives a dynamic view of an object
4. Activity Diagram
- Presents the structure of a process or other computation as a step-by-step flow of control and data within the computation. Activity diagrams focus on the dynamic view of the system
- Activity diagrams focus on describing actions in terms of behavior
- State diagrams focus on the results of behavior
5. Sequence Diagram
- An interaction diagram is an interaction diagram that represents an interaction consisting of a set of objects or roles and the messages that may be sent between them. Interaction diagrams focus on a dynamic view of the system. Sequence diagrams are interaction diagrams that emphasize the chronological order of messages
Vi. Collaboration diagram (communication diagram, name after UML2.0)
- Is an interaction diagram that emphasizes the organizational structure between objects that send and receive messages. A collaboration diagram shows a series of objects and the relationships between them and the messages sent and received between them
7. Component Diagram
- Component diagram is used to represent the relationship between components, classes or interfaces and components in the system. It consists of source code files, binary code files, executable files or dynamic link libraries (DLLS), and is connected by dependencies
- Component diagrams are used to represent a static design implementation view of the system
- Is one of the two types of diagrams that are modeled physically
Viii. Deployment Diagram
- Used to display the physical architecture of the software and hardware in the system
- In a deployment diagram, you can learn about the physical relationship between software and hardware components and the distribution of components that process nodes
- Is one of the two types of diagrams that are modeled physically
Nine, static graph is divided into two categories:
- Static models (system architecture) : use case diagrams, class diagrams, object diagrams, component diagrams, deployment diagrams
- Dynamic models (system behavior) : state diagrams, activity diagrams, sequence diagrams, collaboration diagrams