UML drawing use case diagram __uml

Source: Internet
Author: User

use case diagram.

composition: System boundaries. Participants. Case. Relationship.

Participant: Actor is not a person, but a role to play when participating in a use case.

If the action of one role is done by another role agent, establish a dependency between the role and the other role.

How to identify the participants. who is providing information to the system? Who gets information from the system. Who operating system. What external resource systems are used by the system to interact with existing systems

A description of the sequence of actions that a system, subsystem, or class interacts with an external participant (actor), including various sequences and sequence of errors.

Use case analysis can be considered as the decomposition of system functions.

How to determine the granularity of use cases?

The granularity of the use case (the size of the use case) can be large and small, and generally one system is easily controlled in about 20. A use case is a system-level abstract description, not refinement (what to do, what to do). Complex systems can be divided into several subsystems for processing.

How do I get a use case?

What tasks the participants want the system to perform.

What information the participant accesses in the system (create, store, modify, delete, and so on).

What information needs to be provided to the system from outside.

You need to tell the participants about the system's event.

How to maintain the system.

four kinds of relationships in UML.

Association (Association)

Include (include)

Extension (Extend)

Generalization (generalization)

Association Relationship

Describes the relationship between participants and use cases .

Use a one-way arrow to indicate who starts the use case.

Each use case has a role to start, except to include and extend the use case.

contains.

Refers to the relationship between two use cases . One of the use cases (basic use cases, Base uses case) contains the behavior of another use case, which contains use cases, inclusion uses case.

If more than two use cases have a large number of consistent functionality, you can decompose this functionality into another use case, and other pull-through can be used to establish a inclusion relationship with the use case.

The example above is that the three use cases for queries, withdrawals, and transfers have a consistent function, so this feature is extracted as a use case. And the relationship between these three use cases and the extracted use cases is contained.

The included use cases can also be executed when the basic use case is executed, and the included use cases can be executed separately.

If a use case is too functional, it can be modeled as two or more small use cases with the inclusion relationship

extended.

Also refers to the relationship between two use cases . A use case can be defined as an extension of the incremental of the underlying use case, called as an extended relationship. An extended relationship is a method that inserts new behavior into an existing use case. The base use case does not involve extension use cases even if the execution of the extension use case does not occur, only if a specific condition occurs, the extension use case is executed.

generalization (inheritance).

A generalization relationship is formed between a use case and a use case of its several situations. Often the parent use case is represented as an abstract use case.

Any parent use case can appear where the child case is also present.

1 description of the use case. Use case diagram: A view that can only describe the approximate function of a system. Use case Description: Describes the function of a use case in more detail.

2 composition of use case descriptions

Use case name, brief description/Description, priority, participant, precondition, basic event flow, other event flow, extension point, post condition.

Event Flow: A control flow consisting of a sequence of activities when a use case is executed.

Basic Event Flow: A description of the general, expected path in the use case.

Extended Event Flow: The main thing is to describe some unusual situations and select branches.

preconditions: the state in which the participant (actor) and the system should be placed when the use case starts.

Post Condition: What state the system should be placed at the end of the use case.

Take the above "new book information" as an example to illustrate how to refine a use case description. A summary description of the use case

Use case name: New book (UCO1)

Brief description: Input new book information, and automatically store the file.

Event Flow: Basic event flow and extended event stream.

Non-functional requirements

Pre-condition: The user enters the book management system.

Post condition: The storage file that completes the new book information.

Extension points: None

Priority: High (satisfaction 5, unsatisfactory 5) detailed description of

Basic event Flow The librarian sends a "new book info" request to the system. The system requires the librarian to choose whether to add the book is the computer class or fly letter calculation of the type of librarian to make a choice, display the corresponding interface, let the librarian input information, and automatically according to the number rules generated ISBN. The librarian input the information about the book, including: Title, author, publishing house, ISBN number, format. Number of pages, pricing. Whether there is a CD-ROM. The system confirms that the title of the information entered does not have the same name. The System archives The information that is entered.

Expands the event stream. A If you enter a title with the same name, show the name of the book, and ask the librarian to choose to modify the title or cancel the input. A (1) The librarian chooses to cancel the input, then ends the use case, does not do the storage construction work. A (2) the librarian chooses to change the title and go to a.

Build the use case model as shown in the following example.

There is a business requirement as follows, requiring us to have a use case diagram for its artifacts.

1 The system can be used by teachers to record grades for students.

2 The system to create a report card. The system allows users to browse through recorded results.

The first thing to ask here is: 11 teachers can record student information, which means that teachers can input, modify and delete student information. 22 in the system to create a report card, who is to create a report card. There should be a problem with the permissions, the system needs managers to do the work, and another aspect of the system maintenance work. What to do when a report card is created. After the managers check their accuracy, the teacher distributes the report card. 33 The system allows users to browse results, who can browse the results of it. are students and teachers. The participants who get this system are: teachers, students, administrators.

Main Use cases: entry results. Update your results. Generate a report card. Report Card accuracy. Distribute the report card. Browsing results.

the priority of the use case is to be distinguished.

The first is: Record scores, browse scores, update results, generate reports, check the accuracy of the report card, distribute the report card.

refine each use case.

The record score is refined, and the following is the main event stream for the use case. The first is the teacher to determine what to enter the academic results. System to ensure that students are in the database. The teacher explained the record of what the homework was like. Some things that the system starts the database. The system adds homework to the database for students. Teachers to enter students ' homework results. The system checks whether the input results conform to the correct range and format. The system records the performance of the job. The system ends the processing of things. The system suggests that the teacher's grades are well documented.

Discover new use cases from the broken cases and rearrange them by priority.

Use case diagram of computer room toll system.

1, the first is the analysis of the role of the system (Actor).

WHO provides information to the system. -----Students

Who gets information from the system. ----students, administrators, operators, general users

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.