用例建模系统需求

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

使用用例建模系统需求:

•介绍用例建模的优点.

•定义参与者和用例.

•描述用例模型图中可能出现的关系.

•介绍使用用例模型图的步骤

•介绍用例的详细内容

An Introduction to

Use-Case Modeling

•对于信息系统开发来说,最主要的挑战是能够从关联人员那里提取出正确的确实需要的系统需求,并以关联人员可以理解的方式进行说明,以便需求可以得到证实和验证。

•构建一个软件系统最困难的部分是正确地确定要构建什么。

Fred Brooks

User-centered development–重点是理解关联人员的需求。

Use-case modeling–使用业务事件(business events )、发起事件的人(actor),以及系统如何响应这些事件(system responds to those events)。来建模系统功能的过程。

•用例建模来源于面向对象建模技术,但该技术在非对象开发方法中也比较流行,因为它被广泛认为是定义、记录和理解信息系统功能需求的最佳实践。

Benefits of Use-Case Modeling

•提供了一个捕捉用户需求的工具

•将系统分解成更易于理解(掌控)的小块

•提供了与用户及其它关联人员进行交流的工具

•提供了确定、分配、跟踪、控制和管理系统开发活动(尤其是增量和迭代开发)的手段

•为定义测试计划和测试用例提供基础

Benefits of Use-Case Modeling (continued)

•为用户文档和系统开发文档提供基准

•提供了需求跟踪的工具

•提供确定数据对象和实体的起点

•提供了用户和系统接口的说明

•提供了驱动系统开发的一个框架

Use case– a behaviorally related sequence of steps (scenario), both automated and manual, for the purpose of completing a single business task.

用例是一系列行为上相关的步骤(场景),既可以是自动的也可以是手工的,其目的是完成一个单一的业务任务。

包括两部分:

Use-case diagram:用例图

Use-case narrative:用例描述

Use case– subset of the overall system functionality

•一个用例所描述的场景可能包含一个或多个需求

Actor– anyone or anything that needs to interact with the system to exchange information.

•human, organization, another information system,

external device, even time.

Temporal event– a system event triggered by time.

•The actor is time.

Association–a relationship between an actor and a use case in which an interaction occurs between them.

•有箭头的表示参与者发起用例. (1)

•Association lacking arrowhead indicates a receiver actor. (2)

没箭头的表示参与者是接受者

•关联关系可以使双向或单向的

Use Case Extends Relationship(扩展关系)

Extension use case–一个用例可能包含多个步骤的复杂功能,使得用例难以理解。为了简化,将较复杂的步骤提取成专门用例,成为扩展用例,它与原用例间是扩展关系。

•一个用例可有多个扩展用例,扩展用例不能被其他用例调用

•Labeled <>.

Use Case Uses Relationship

使用(包含)关系

Abstract use case–多个用例包含相同的功能步骤,把公共步骤提取成抽象用例,代表某种形式的“复用”

●抽象用例可以被其它用例调用

●箭头指向抽象用例

●Labeled <>

Use Case Depends On Relationship(依赖关系)

Depends On–use case relationship that specifies which other use cases must be performed before the current use case.

•决定用例开发的顺序

•Labeled

<>

Use Case Inheritance Relationship(继承关系)

Inheritance–当多个参与者共享同样的行为时(发起先同的用例),可以将这些公共行为分配给一个新的抽象参与者,减少与系统的通信。

•其它参与者可以继承此抽象参与者。

需求用例建模过程—P173

•构造需求用例的目的是提取和分析需求信息,模型表示用户需要什么,不涉及如何构造和实现

•Steps

1.Identify business actors.

2.Identify business use cases.

3.Construct use-case model diagram.

4.Documents business requirements use-case narratives.

•如何发现actors?

•Who or what provides inputs to the system?

•Who or what receives outputs from the system?

•Are interfaces required to other systems?

•是否存在预定时间自动触发的事件?

•谁维护系统中的信息?

•使用名词或名词词组命名参与者(Actors)

Step 2: Identify Business Requirements Use Cases

Business Requirements Use Case - a use case created during requirements analysis to capture the interactions between a user and the system free of technology and implementation details.

•一个系统可能包含许多用例,在需求分析阶段,出于时间和经费的考虑,我们仅粗略关注最关键、最复杂的用例,常称为基本用例(Essential Use Case)

•When looking for use cases, ask the following questions:

•Actor的主要任务是什么?

•What information does the actor need form the system?

•What information does the actor provide to the system?

•系统需要通知actor发生的变化和事件吗?

•Actor需要通知系统发生地变化和事件吗?

•Use cases 通常使用动词词组命名(i.e. 提交订单)

Step 3: 构建用例模型图(Use Case Diagram)

Step 4: 记录业务用例需求描述(Use-Case Narratives)

•首先在高层(high level)记录,以便尽快理解系统的事件和量级

•然后回到每个用例,扩展它,详细记录业务需求描述。

Use Cases and Project Management

•Use-case model 可以驱动整个系统开发过程

•完成需求用例后,项目经理和系统分析员可以用需求用例安排项目计划。

•To determine importance of use cases, will create:

•Use-case ranking and evaluation matrix

•Use-case dependency diagram

Use-Case Ranking and Priority Matrix(用例分级)

•In most projects, the most important use cases are developed first.

Use-case ranking and priority matrix–a tool used to evaluate use cases and determine their priority.

•Evaluates use cases on 1-5 scale against six criteria.

相关文档
最新文档