Use case diagram, class diagram, activity diagram, class diagram, and sequence diagram usage Summary

Source: Internet
Author: User

9. use case diagram: 1. Definition: a dynamic view composed of actors, use cases, and their relationships used to describe system functions is called a use case diagram.

2. Composition: ① participants (executors)

1) definitions of participants: Participants refer to the abstraction of external entities of people, systems, or classes that exist outside the system and interact directly with the system. A participant is an entity outside the system (which can be any thing or person). It participates in the execution process of the case in some way.

2) Participants

Two representations of participants

② Use case

Use Cases are the system services or functional units that the participants can feel. It defines how the system is used by the participants and describes a conversation between the participants and the system to use a complete function provided by the system. (The Use Case name should start with a verb .)

1. the inclusion relationship refers to the use case that can simply contain the behaviors of other use cases and take the behaviors of the use case contained in the use case as part of its own behavior. (The arrow points to the include use case from the base case .)

2. Extended relationship: under certain conditions, add new behaviors to existing use cases, and obtain new use cases as extended use cases. The original use cases are called Basic use cases. (The arrow direction is from the extended use case to the base use case .)

3. generalization relationship of use cases: when two or more use cases in the system have commonalities in behavior, structure, and purpose, the generalization relationship can be used.

General Relationship

12. Class diagram: 1. It is mainly used to describe the relationship between people and things (classes) and between them. The relationships in a class diagram include: dependency, generalization, association, and realization ).

2. Class representation: A class is represented by a rectangle. It contains three columns. In each column, the class name, class attributes, and class operations are written respectively.

.

3. Category

1) abstract class

When designing a class, if some specific classes have the same methods or attributes, we can extract these identical methods or attributes from these specific classes, encapsulate them into an abstract class, and then redefine these specific classes by extending the abstract class.

Abstract classes are classes that cannot be directly instantiated, that is, they cannot be used to create objects.

In UML, abstract classes and abstract methods are represented in italics. However, because italics are not easily represented in sketches, abstract constructor is recommended.

2) Interface

An interface is a mechanism similar to an abstract class. All methods in an interface are abstract methods.

An interface can have a name, which is used to distinguish it from other interfaces. An Interface Name is a short term or noun phrase drawn from the vocabulary of a problem domain. In UML, there are two interface representation methods.

The icon indicates that the method is simple. It is only applicable to interfaces and sketches with only one operation.

The constructor notation is represented by a Class (interface is actually a special class). It has the advantage of being able to add multiple abstract methods with stronger representation capabilities.

3) Association class

Like a class, association can also have its own attributes and operations. In this case, this association is actually an association class.

An association class is both an association and a class. It connects two classes like an association, and can define a group of characteristics that belong to the association itself.

Note: you can create an association class only when the objects at each end of an association are 1:1.

Library Management System class diagram

13. Activity Diagram 1. Definition: Activity diagram consists of activity nodes and conversion process. It describes the control flow formed by a series of activities of a system or business. It describes the entire process from one activity to another, that is, the activity change process of a transaction or object. The activity diagram is used to model the system workflow.

2. Composition: divergence and convergence

If some activities are executed concurrently, we use the branch and convergence to represent the concurrent activities. Both the branch line and the confluence line are expressed by a bold horizontal or vertical line segment (synchronous line ).

14. Sequence Diagram 1. Definition: sequence diagram, also known as sequence diagram and sequence diagram, describes the interaction between objects in the system through messages, emphasize the order of messages on the timeline.

2. Functions of the sequence chart

A Sequence Chart is often used to describe the implementation of use cases. It shows the objects that implement the use cases through message collaboration. In a sequence chart, it identifies the order in which messages interact.

3. Composition ①

② Lifeline

The lifeline is a vertical dotted line, indicating the existence of objects in the sequence chart for a period of time. The bottom center of each object carries a lifeline. A lifeline is a timeline. the time used depends on the interaction duration.

③ Activation box (control focus, session)

An object lifecycle contains a rectangle, indicating that the object is active and the object is executing a task. After an object completes its work, it is removed and activated, and the object is idle.

④ Message (method call)

A message is used to describe the communication between objects. It includes the message name and message parameters. There are five types of messages: Call, return, send, create, and destroy. In UML, messages are represented by arrows, and the types of arrows represent the types of messages.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.