What are the relationships in use case diagrams and class diagrams

Source: Internet
Author: User
Tags dashed line

Relationships in use case Diagrams (association), Generalization (generalization), include (include), extension (Extend).

" in the class diagram, the following relationships are common: generalization (generalization),   implementation (realization), Association (association), Aggregation (Aggregation), combination (composition), dependency (Dependency).

associating, generalizing, implementing, aggregating, combining, and relying on my blog The four relationships of UML , such as the need to browse and poke the red font , have been elaborated in detail, which focuses on inclusion and extension.


(1) Inclusive relationship (include):

Definition: When two or more use cases use the same set of actions, the same action can be extracted as a separate sub-use case, which is shared by multiple base use cases. Because the child use case is extracted, the base use case is not a complete use case, so the base use case in the inclusion relationship must be used in conjunction with the child use case to be complete, and the execution of the base example use case is bound to be executed.

The use case diagram uses a dashed line with arrows (callout <<include>> on line), and the arrows point from the base use case to the child use case.

Include an instance:



As we all know, as long as the implementation of maintenance database operations must be used to add and remove changes to check the four functions, the diagram shows that the maintenance database actions include additions, deletions, changes, check (arrows pointing to the included party).


(2) Extended Relationship (Extend):

definition: is the extension of the base use case, the base use case is a complete use case, even if there is no child use case participation, can also complete a complete function. An extension point exists in the base use case of the extension, and the child use case is only executed when the extension point is activated.

The use case diagram uses a dashed line with arrows (labeled <<extend>> on line), and the arrows point from the child use case to the base case.
For example:





Query student information on-machine record and query student Recharge record module can be done by itself without the involvement of child use cases. The export action is only performed when the export as Excel button is clicked.

Summary:

the difference between inclusion and extension: the child use case is an integral part of the base use case, as long as the base use case is executed, the sub-use case is bound to execute; In the extended relationship, the child use case is a simple function extension of the base case, and the function of the base use case can be completed without the participation of the child cases.


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

What are the relationships in use case diagrams and class diagrams

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.