UML Drawing Document-sequence diagram

Source: Internet
Author: User

In UML, the implementation of use cases is specified and described using an interactive diagram. The interaction diagram shows the relationship between objects and the messages processed between objects to model the dynamic characteristics of the system. There are two types of interaction diagrams: sequence diagram and collaborative diagram. The emphasis is different, but the semantics is equivalent and can be converted to each other. This section only describes the sequence diagram.

 

A sequence diagram is a time series interaction diagram that emphasizes messages. It consists of class roles, lifeline, activation period, and messages.

Class role(Class role)

Represents the role of an object in a sequence chart in interaction. It can be an actor or an object ). In UML, the operator is represented as a small humanoid, and the object is represented as a rectangle, where the object name is underlined.

Lifeline(Lifeline)

Indicates the existence of objects in a sequence chart over a period of time. In UML, messages are represented by labeled arrows in a sequence diagram.

Activation period(Activation)

Represents the period in which objects in the sequence chart perform an operation. In umlk, the lifeline is represented by a dotted line.

Message(Message)

Defines the classes for information exchange in interaction and collaboration, used to model the communication content between entities. In UML, the activation period is represented by a thin rectangle.

 

Now let's take the recharge function in the "Data room Charging System" as an example.

1. Search for roles:

1. Operator

Ii. Search for objects:

1. interface.

2. operations at the business layer should also be processed by objects.

3. Database

3. Interaction between objects and roles:

1. The operator enters the recharge interface.

2. The operator enters the card number

3. The operator sends the recharge command through the interface

4. The system checks whether the format of the card number is correct.

5. The system queries the existence of the database verification card number.

6. If the card number exists, the system prompts you to enter the recharge amount.

7. Enter the amount and click "OK ".

8. The system adds the recharge information to the database.

9. Display recharge success Information

Iv. Final sequence diagram:

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.