UML Use case diagram "concepts, relationships, examples"

Source: Internet
Author: User

first, UML use case diagram basic concept

UML Use-case diagrams: Dynamic views that describe the functionality of a system, consisting of actors "actors", use cases, and their relationships. Use case diagrams consist of actors, use cases, arrows, and system boundaries.

STARTUML, the UseCase bar displays the following: Top to bottom: package, use case, actor, association, direct, generalization, dependency, include, extend, system boundary.



Actor "actor": Refers to the role that is played outside the system in the use of the system or interaction with the system.

Description

1, the participant does not refer to the specific person, just interacts with the system role.

For example: for the production of products, manual assembly of products, people are participants. Technology developed, robots can replace human production, the robot is a participant.

2, a thing or user can play multiple roles, that is, the thing or user corresponding system of multiple participants.

For example: In the production process, sometimes rush time to ship, the production line is not busy, the Director also on the production line assembly machine. One day QC leave, nobody rotations, director and go when QC. The director has only one, but plays a number of roles.

3, a number of things or users can also correspond to a participant.

In the production product, the assembly staff and the robot correspond to one participant.

4, the main characteristics of the participants are: as an external user and system interaction.


Use case: A system functional unit that is visible outside the system. The function of the system is provided by the system unit and is expressed through a series of system units exchanged with one or more participants.


ii. Relationship of UML use case diagram

"The picture is from: http://kb.cnblogs.com/page/129491/"



Include include: Use the include (inclusion) use case to encapsulate a set of similar actions (behavior fragments) that span multiple use cases so that multiple base (base) Use cases are reused. The relationship between the base use case control and the containing use case, and whether the event stream containing the use case will be inserted into the event stream of the base case. The base use case can depend on the results that contain the execution of the use case, but neither side has access to the other's properties.

Description

1. The most typical application of a UML use case diagram relationship is reuse, which is defined as the context in which it is described. But sometimes when the event of a use case flows through complexity, in order to simplify the description of the use case, we can also abstract an event stream into a contained use case, instead, when the use case is divided too thin, you can also abstract a base use case to contain the use cases of these fine particles.

2. The use case that the arrow points to is the included use case, which is referred to as the use case; the arrow starts with the use case. The inclusion use case is required, and if the inclusion use case is missing, the base use case is incomplete; the containing use case must be executed without satisfying a certain condition; its execution does not alter the behavior of the base use case.

For example: Contractor to pick up the project, to build a house. Build a house to buy materials, to draw drawings, but also walls and so on:


Extend "extend": use a relatively independent and optional action in the base case, encapsulate it with an extension (Extension) use case, and then extend it from the extension points (Extension point) declared in the base use case to make the base case behavior more concise and more focused. The extension use case adds new behavior to the base use case. An extension use case can access the properties of the base use case, so it can determine whether to execute itself based on the current state of the extension point in the base case. However, the extension use case is not visible to the base use case.


Description: The use case that the arrow points to is an extended use case, which is called an extension use case; extension Use cases are optional, and if the extension use case is missing, the integrity of the base use case is not affected, and the extension use case is executed under certain conditions, and its execution alters the behavior of the base use case.

For example: When the walls, smoking, drinking by contractor to decide whether to carry out. But building walls is a must. If contractor does not smoke and drink, it will not affect the integrity of the walls, but if you drink more, building a house prone to accidents, that is, the implementation of the expansion of the use case changed the behavior of the base case.


Generalization "genneralizition": child use cases are similar to parent use cases, but exhibit more specific behavior, and child use cases inherit all the structures, behaviors, and relationships of the parent use case.

For example, building a house to move bricks, you can move red bricks, you can also move cement bricks:



Some shortcomings, many correction, common progress!


Resources:

A case diagram relationship of UML modeling

UML Use case diagram summary

"Startuml detailed"


UML Use case diagram "concepts, relationships, examples"

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.