__UML of correlation between use cases in UML use case diagrams

Source: Internet
Author: User
Tags extend

There are only 3 elements in the

Use case diagram, which are roles (actor), "Use Cases", "Association (Association)".

The so-called "role" is what people or things use your system, that is, to do some things.
For example, you go to an ATM machine to withdraw money. So in this use case diagram, you and the ATM machine are "role"

"use cases" that are actions, actions, or triggering events.
  For example, as shown in the example above, "Enter a password" is a use case.

Association, which is the relationship between roles and use cases or roles and roles. There are several types of
associations, which are described below.


Include/using (included): the relationship between the base use case and the containing use case. Explains how to insert the behavior defined in a use case into the behavior defined by the base use case. The base use case can see the containing use case and depends on the execution result of the containing use case. But they cannot access each other's properties.

Extend (extension): Refers to the relationship between the extended use case and the base use case, explaining how the behavior defined by the extension use case is inserted into the sequence of behavior defined by the base use case. Extension Use cases incrementally modify the base use cases in a modular way.

Generalization (generalization): A class-element relationship between a broader element and a more specific element. The more specific elements contain a wider range of elements and contain more information. An instance of a more specific element can be used wherever a broader element is used.


Description
Include/using is better understood, that is, the use of multiple use cases (usecase a ' plus apostrophe is the original usecase before extracting the common part, UseCase C ') is extracted from the same part as a single use case (UseCase B), Then the use case A, C, after the separation, is called B, and the connection is drawn.



Extend and generization are easy to confuse, as the reason may be that inheritance in the Java language (that is, generalization in UML) uses the word extends. There are a number of articles on the Internet directly as a extend, the learner caused by misleading; There are also articles that extend and generization are special and general relationship, below I give a concrete example to illustrate.

Example
From this picture, we can see:
"contain" is better understood, the two can be regarded as a "has a" relationship.
Generalization is a general relationship between "abstract and concrete", and a child case (a more specific use case) contains the parent use case (more often than a generic use case) and is an "is a" relationship. "Reporting Errors by mail" and "Reporting errors by SMS" are specific "reporting errors."
Extension use cases and base use cases are neither "has a" nor "is a" relationships, but "incrementally modify the base use cases in a modular way" to provide some additional functionality.

You can use extension cases in the following situations:

A. Indicates that a part of the use case is optional system behavior (so that you can separate the optional behavior and the required behavior in the model);

B. A tributary which indicates that it is implemented only under specific conditions (e.g. exceptional conditions);

C. Indicates that there may be a set of behavior segments in which one or more segments can be inserted at extension points in the base case. The inserted behavior segment and the order of insertion depend on the interaction with the protagonist when the basic use case is executed.
Figure 2.3 gives an example of an extended relationship in which a tributary of a lost book is executed only in the event of an exceptional condition (the reader loses the book).

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.