Relationship in UML use case diagram

Source: Internet
Author: User

The previous blog summarized the use case diagram, in which the relationship between use cases is only included, because the relationship between use cases is not particularly profound. This is also because the UML use case diagram has not passed the acceptance of the master. The relationship between use cases must be further understood. This blog will summarize the relationship between use cases after further understanding (not yet thorough.

1. Association: It is represented by a solid line with arrows, and the participants point to the use case.

Associations refer to the relationships between participants and use cases and communication between participants and use cases. One participant can be associated with multiple use cases, and one use case can be associated with multiple participants. However, the communication between each pair of participants and use cases (that is, on a line) must be unique. Otherwise, there will be participants or use cases that can be merged.

2. Dependency: Expressed by solid line with a hollow triangle, pointing from child to parent.

Generalized relationships are the relationships between participants or between use cases. Generalization refers to the inheritance relationship. A sub-case (sub-participant) inherits all the behaviors and communication of the parent case (parent participant. At the same time, you can also increase your own unique behavior and communication. Take the three participants in the IDC charging system as an example. The operator inherits all the functions of general users and adds functions such as recharge and work record query. The Administrator inherits all the functions of the operator and adds functions such as checkout and report generation. The example is shown below:

3. include: it is represented by the dotted line with arrows and the layout (include). The basic use case points to the included use case.

The inclusion relationship is the relationship between use cases. The so-called include relation refers to the relationship between two use cases when one use case is executed on the premise of another use case. That is to say, a use case cannot be executed independently. It is executed with the execution of another use case, and it also disappears with the demise of another use case. Take the data center billing system as an example, for example:

The inclusion relationship between the settlement case and the summary refund case. If the settlement case does not run, the sum refund case cannot be executed, and the sum case ends as well.

4. Extended relationship (extend): it is represented by the dotted line with arrows and the extend. The right basic use case points to the extended use case.

The extended relationship is also the relationship between use cases. It refers to activating another use case when a specific condition occurs during execution of a use case. Certain conditions here are called extension points, and activated use cases are called extension cases. Take the insufficient balance in the computer room charging system as an example, for example:

If you find that the balance in the student card number is less than the minimum balance, you can directly transfer it to the recharge use case. However, the recharge use case can also be executed separately.

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.