Include, extend, and generalization in use case

Source: Internet
Author: User

The relationship between use cases should be difficult to understand when drawing a use case diagram. The relationship between use cases can be divided into three types: Include, extend, and generalization.

First, we will introduce generalization, which is easy to understand. The Generalization relation is an inheritance relation. The subcase inherits all the behaviors, links, and communication relationships of the base case, that is to say, subcases can be used to replace any use case. The typical usage is that the "Payment Order" Use Case can have two subcases: "cash payment" and "credit card payment. The generalization relationship is represented by a hollow arrow in the use case diagram, and the arrow direction refers to the base case.

Include and extend are two confusing relationships. First, let's look at the include relationship. Include is the inclusion relationship. When two or more use cases use the same group of actions, you can extract the same group of actions as an independent sub-use case, shared by multiple base use cases, which is similarCodeDuplicate code is extracted as an independent function call in development. Because the child use cases are extracted, the base use cases are not a complete Use Case. Therefore, the base use cases in the include relationship must be used with the child use cases to be complete, and the child use cases must be executed later. The include relationship is represented by a dotted line with an arrow in the use case diagram (marked online <include>), and the arrow points to the sub-case.

Extend relationships are extensions of base use cases. The biggest difference from include is that the base use case of extend is a complete Use Case, even if no sub-use case is involved, you can also complete a complete function. There will be an extension point in the base use case of extend. The sub-use case will be executed only when the extension point is activated. A typical example is after the query case, there can be an extended export case. The extend relationship is represented by a dotted line with arrows in the use case diagram (online labeling <extend>), and the arrow refers to the base case.

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.