[读书笔记-- Learning UML 2.0, OReilly, April 2006] Use case diagram

本文深入解析UML 2.0中的用例图,介绍如何定义用例及其关键要素,如目标上下文、前置条件、成功与失败的结束条件等,并通过创建新的博客账户这一实例详细说明了用例描述的构成。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

读书笔记:Learning UML 2.0, OReilly, April 2006
 
(一)Use case diagram
 
Rule of thumb to specify a Use Case:
A use case is something that provides some measurable result to the user or an external system.
 
Approaches:
1.      Capture an initial set of actors;
2.      Find cases where the system is used to complete a specific job;
 
Use case descriptions:
Table 2-1. Some types of information that you can include in your use case descriptions

Use case description detail

What the detail means and why it is useful

Related Requirements

Some indication as to which requirements this use case partially or completely fulfills.

Goal In Context

The use case's place within the system and why this use case is important.

Preconditions

What needs to happen before the use case can be executed.

Successful End Condition

What the system's condition should be if the use case executes successfully.

Failed End Condition

What the system's condition should be if the use case fails to execute successfully.

Primary Actors

The main actors that participate in the use case. Often includes the actors that trigger or directly receive information from a use case's execution.

Secondary Actors

Actors that participate but are not the main players in a use case's execution.

Trigger

The event triggered by an actor that causes the use case to execute.

Main Flow

The place to describe each of the important steps in a use case's normal execution.

Extensions

A description of any alternative steps from the ones described in the Main Flow.


Example:
Table 2-2. A complete use case description for the "Create a new Blog Account" use case

Use case name

Create a new Blog Account

Related Requirements

Requirement A.1.

Goal In Context

A new or existing author requests a new blog account from the Administrator.

Preconditions

The system is limited to recognized authors and so the author needs to have appropriate proof of identity.

Successful End Condition

A new blog account is created for the author.

Failed End Condition

The application for a new blog account is rejected.

Primary Actors

Administrator.

 

Secondary Actors

Author Credentials Database.

 

Trigger

The Administrator asks the CMS to create a new blog account.

Main Flow

Step

Action

 

1

The Administrator asks the system to create a new blog account.

 

2

The Administrator selects an account type.

 

3

The Administrator enters the author's details.

 

4

The author's details are verified using the Author Credentials Database.

 

5

The new blog account is created.

 

6

A summary of the new blog account's details are emailed to the author.

Extensions

Step

Branching Action

 

4.1

The Author Credentials Database does not verify the author's details.

 

4.2

The author's new blog account application is rejected.

 
2.2.      Use Case Relationships
2.2.1.    The <<include>> Relationship
2.2.2.    Special Cases
   2.2.3.    The <<extend>> Relationship

 
 
2.3  Use Case Overview Diagrams
           Use Case Overview diagrams give you an opportunity to paint a broad picture of your system's context or domain. Unfortunately, Use Case Overviews are badly named as they don't usually contain any use cases…. they are more a placeholder and starting point to for the rest of your model's detail.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值