Use case diagram in UML

Source: Internet
Author: User

Use case diagram: used to describe the relationship between users, requirements, and system function units. It shows a system function model diagram that can be observed by external users.

Main Purpose: To help developers understand the functional requirements of the system in a visualized manner

Take a look at the following example:


It can be seen that the use case diagram consists of a villain, an ellipse, and a line. What do they mean in the use case diagram?

 

The villain is what we call the role. When developing a system, after identifying the users of the system, we can sum up the roles of the system. Different roles have different responsibilities, and the functions of the system are different, that is, we think about our system based on different roles.

For example, there are three people (roles) in the data center charging system. The average users, operators, and administrators have different permissions in the system.

In addition, the role may be a person or a person. It may be another system. When the system interacts with another system, another system can be painted as a role.

 

An elliptic represents what the villain does. The text in the moving object structure in the elliptic + elliptic represents use cases. These use cases indicate what the system can do.

For example, in our data center charging system, general users can view the student balance, change the password, and the operator can register, recharge, and return cards.

 

Line: There are two types of lines: one is the line between the role and the use case, and the other is the line between the use case and the use case.

First, let's look at the line between the role and the use case. There are three types: no arrows, arrows pointing to the use case, and arrows pointing to the role. No matter which party it points to, it is used to contact the role (villain) and use case (elliptical), indicating what functions a role has to do.

A line with arrows indicates the flow of data during the interaction between the role and the system. The arrow points to the use case, indicating that the role needs to input data into the system, and the arrow points to the role, this indicates that the system needs to output data out, without arrows and data flow directions.

 

Second, the line between the use case and the use case indicates the Relationship Between the use case and the use case. Note in:

 

Annotation 1: generalized relationship

Generalized relationship: A subcase represents a special form of a parent case. A subcase inherits attributes and methods from the parent case. It can also add its own behavior to change or overwrite the inherited behavior. That is to say, the sub-use case has the general nature of the parent case, but it also extends the parent case and has its own particularity. Generalization is used when one or more of the general use cases are special in the system.

 

NOTE 2: Include)

Separate the public content of several use cases into a separate included Use Case (usecase5 ).

The included use case is called the provider use case. Provider use cases provide functions to customer use cases (usecase3, usecase4)

The inclusion relationship is mainly used to break down the Functions Represented by a complex use case into smaller steps.


NOTE 3: extended relationships

Extended relationship refers to an extension of the use case function, which is equivalent to providing an additional function for the basic use case.

For example, in the IDC charging system, you need to print a report for bill query.

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.