chap7 需求分析-用例图_第1页
chap7 需求分析-用例图_第2页
chap7 需求分析-用例图_第3页
chap7 需求分析-用例图_第4页
chap7 需求分析-用例图_第5页
已阅读5页,还剩55页未读 继续免费阅读

付费下载

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、Chapter 7MODELING SYSTEM REQUIREMENTS WITH USE CASES使用用例建模系统需求An Introduction to Use-Case Modeling 简介One of the primary challenges in a system design process is the ability to elicit(提取) the correct and necessary system requirements from the stakeholders and specify them in a manner understandable t

2、o them so those requirements can be verified and validated.系统开发过程的首要问题是正确地提取用户需求,并以用户能够理解的方式进行表达,以便他们他们能够核实并确认An Introduction to Use-Case Modeling 简介传统的建方法:Data and process modelsPrototypesrequirement specifications问题:设计者理解而用户不理解Leads to scope creep(范围蔓延), schedule creep (进度蔓延), cost overruns(成本超支).

3、User-Centered Development and Use-Case Modeling以用户为中心的系统开发与用例建模User-Centered DevelopmentUser-centered development a process of systems development based on understanding the needs of the stakeholders and the reasons why the system should be developed.系统开发建立应在理解用户需求之上Use-Case Modeling 用例建模Use-case mo

4、deling the process of modeling a systems functions in terms of 针对系统功能进行建模:business events:有哪些业务事件? who initiated the events:谁发起了这些事件?and how the system responds to those events:系统将如何响应这些事件?Sample Use-Case Model DiagramBenefits of Use-Case ModelingProvides a tool for capturing functional requirements

5、(获取功能需求).Provides a means of communicating with users and other stakeholders concerning system functionality in a language that is easily understood.(便于沟通)Provides a tool for requirements traceability(需求跟踪).Provides a framework for driving the system development project. (提供一个驱动系统开发项目的框架)System Conc

6、epts for Use-Case ModelingUse-case diagram describes who will use the system and in what ways the user expects to interact with the system. 用例图描述系统与外部系统或用户之间的交互图Use-case narrative a textual description of the business event and how the user will interact with the system to accomplish the task.用例说明针对

7、用例执行过程的文本说明Use case a behaviorally related sequence of steps (a scenario), both automated and manual, for the purpose of completing a single business task.用例从外部使用者的角度描述系统功能,是一系列相关的操作步聚,共同完成单一的工作任务。Sample Use-Case Model DiagramBasic Use-Case SymbolsUse case (用例) subset of the overall system functiona

8、lityRepresented graphically by a horizontal ellipse(椭园) with the name of the use case appearing above, below, or inside the ellipse.Actor (参与者) anything that needs to interact with the system to exchange information. Could be a human, an organization, another information system, an external device,

9、or even time. Temporal event (时间事件) a system event triggered by time.The actor is time.Four Types of ActorsPrimary business actor The stakeholder that primarily benefits from the execution of the use case.e.g. the employee receiving the paycheckPrimary system actorThe stakeholder that directly inter

10、faces with the system to initiate or trigger the business or system event.e.g. the bank teller entering deposit informationExternal server actor The stakeholder that responds to a request from the use case.e.g. the credit bureau authorizing a credit card chargeExternal receiver actorThe stakeholder

11、that is not the primary actor but receives something of value from the use case.e.g. the warehouse receiving a packing slipUse Case Association RelationshipAssociation(关联) a relationship between an actor and a use case in which an interaction occurs between them.Association modeled as a solid line c

12、onnecting the actor and the use case.Association with an arrowhead touching the use case indicates that the use case was initiated by the actor.Association lacking arrowhead indicates a receiver actor. 无箭头则表示一个接收者Associations may be bidirectional or unidirectional.Use Case Extends RelationshipExtens

13、ion use case(扩展用例) a use case consisting of steps extracted from a more complex use case in order to simplify the original case and thus extend its functionality.Relationship between the extension use case and the use case it is extending is called an extends relationship.Represented as an arrowhead

14、ed line beginning at the extension use case and point to the use case it is extending.Each extends relationship line is labeled “.”Use Case Uses RelationshipAbstract use case a use case that reduces redundancy(冗余) among two or more other use cases by combining the common steps found in those cases.R

15、elationship between the abstract use case and the use case that uses it is called a uses (or includes) relationship.Depicted as an arrow headed line beginning at the original use case and pointing to the use case it is using. Each uses relationship line is labeled “.”Use Case Depends On Relationship

16、Depends On a use case relationship that specifies which other use cases must be performed before the current use case.Can help determine sequence in which use cases need to be developed.Depicted as an arrow headed line beginning at one use case and pointing to a use case it is dependent on. Each dep

17、ends on relationship line is labeled “.”Use Case Inheritance RelationshipInheritance(继承) a use case relationship in which the common behavior of two actors initiating the same use case is extrapolated and assigned to a new abstract actor to reduce redundancy.Other actors can inherit the interactions

18、 of the abstract actor.Depicted as an arrowheaded line beginning at one actor and pointing to the abstract actor whose interactions the first actor inherits. The Process of Requirements Use-Case ModelingSteps步骤Identify business actors (参与者).Identify business use cases (用例).Construct use-case model d

19、iagram (用例模型图).Documents business requirements use-case narratives (用例说明).案例背景:Soundstage Entertainment Club传统广告:“1便士任选10盘CD,只要两年内按正常的会员价格购买5盘以上的CD”;会员按月收到促销商品广告和产品目录,从中选择商品;客户也可以订购产品目录中的其他商品和特殊商品;当会员履行了他们最初的订阅合同后,他们就具有了获得奖卷的资格,奖卷可以用来况换产品目录中的免费商品;最近12个月内购买过商品的会员帐号为活动帐号,否则为非活动帐号;非活动帐号再次使用需先进行激活。案例项目的

20、初步范围:营销订阅销售和订单录入(对所有的办事处)仓储(所有的发行中心)库存控制和采购发货和验收(所有发行中心)应收帐款和应付帐款所有俱乐部的会员服务外部团体潜在会员、会员、以前的会员、供应商、批发商Step 1: identify Business ActorsWhen looking for actors, ask the following questions:Who or what provides inputs to the system?谁向系统提供输入?Who or what receives outputs from the system?谁接收系统的输出?Are interf

21、aces (接口) required to other systems?需要与其他系统接口吗?Are there events that are automatically triggered (触发) at a predetermined time?有无在预定时间自动触发的事件?Who will maintain information in the system?谁来维护系统中的信息?Sample List of Actors(同义词)Step 2: Identify Business Requirements Use CasesDuring requirements analysis,

22、strive(努力) to identify and document (记录) only the most critical, complex, and important use cases, often called essential use cases.在需求分析阶段,应重点识别和记录那些最为关键、最为复杂、以及最为重要的用例,统称为基本用例looking for use cases, ask the following questions:What are the main tasks of the actor?参与者的主要任务是什么?What information does t

23、he actor need from the system?参与者需要系统提供什么信息?What information does the actor provide to the system?参与者向系统提供什么信息?Does the system need to inform the actor of any changes or events that have occurred?一旦变化或事件发生了,系统是否需要及时通知参与者?Does the actor need to inform the system of any changes or events that have occ

24、urred?一旦变化或事件发生了,参与者是否需要及时通知系统?Sample Context DiagramSample Use-Case GlossarySample Use-Case Glossary (continued)continuedSample Use-Case Glossary (concluded)Step 3: Construct Use-Case Model DiagramStep 4: Document Business Requirements Use-Case Narratives(说明书)Document first at high level to quickly

25、 obtain an understanding of the events and magnitude of the system.文档首先是宏观层面的Then expand to a fully-documented business requirement narrative再逐步扩展到完整的需求说明书Include the use cases typical course of events and its alternate courses.Sample High-Level Version of a Use-Case NarrativeSample Expanded Version

26、 of a Use-Case NarrativecontinuedSample Expanded Version of a Use-Case Narrative (cont)continuedSample Expanded Version of a Use-Case Narrative (cont)Use Cases and Project ManagementUse-case model can drive the entire development effort.Project manager or systems analyst uses business requirements u

27、se cases to plan (estimate and schedule) the build cycles of the project.Build cycles are scoped on the basis of the importance of the use case and the time it takes to implement the use case.To determine importance of the use cases, will create:Use-case ranking and evaluation matrixUse-case depende

28、ncy diagramUse-Case Ranking and Priority MatrixIn 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 a scale of 1 to 5 against six criteria.Significant impact on th

29、e architectural design.Easy to implement but contains significant functionality.Includes risky, time-critical, or complex functions.Involves significant research or new or risky technology.Includes primary business functions.Will increase revenue or decrease costs.Sample Use-Case Ranking and Priorit

30、y MatrixUse-Case Dependency Diagram Use-case dependency diagram a graphical depiction of the dependencies among use cases.Provides the following benefits:Graphical depiction of the systems events and their states enhances understanding of system functionality.Helps identify missing use cases.Helps f

31、acilitate project management by depicting which use cases are more critical.Sample Use-Case Dependency Diagram 练习1:设计一个小型图书管理系统,具备以下功能:(1)购入新书后,进行图书编号,并登记入库;(2)读者借书,须办理借书证,每个借书证的编号唯一,并将读者的基本信息登记到读者库;(3)当读者借书时,登记流水帐;(4)用户还书时,可查询借书日期,如有超期,则进行罚款处理;(5)输入书号或书名或作者,可查询该书的情况(是否已借出、此种书当前的库存余数等);(6)输入借书证号或读者姓

32、名,可查询此人当前的总借书情况(如书名、数量、借阅日期等)。要求分析该系统,并给出该系统的用例图。练习1(续)如果该小型图书馆完全采用不记名押金管理体系,则用例图应做何改动?当用户租用图书时,提交押金;用户归还图书时,根据租用时间及既定费率计算实际发生费用,将押金剩余部分退还用户或者进行补充收费。进一步思考:自主设计一个社区小型公益图书管理系统除少量自购图书外,其余完全由业主自愿捐赠(不退不赔);图书分类编号,并提供35个关键字,读者可以通过计算机利用图书分类、作者、书名、关键字等进行检索;所有社区业主可凭业主卡在阅览室阅读图书,但如需借阅,其所借图书的价格总额不得超出自己捐赠的图书价格总额;

33、借阅天数不受限制;当有其他读者希望借阅同一本书,可以提出预约,系统将自动用EMAIL通知借阅者该图书已被预约,催促其尽快归还;每月系统自动输出本月新书推介信息,并评选本月的捐赠之星、读书之星予以表彰。要求:分析该系统,并对未尽事宜进行完善性设计,给出该系统的用例图及相关用例的用例说明;练习2: 影碟出租店管理系统要求:购进影碟后,分类编号登记至影碟记录表(包括:碟号、碟名、类型、进价、供应商、出租单价);影碟出租时,登记出租流水帐,记录出租单价及出租日期;影碟归还时,补充登记出租流水帐,记录归还日期、应收金额、实收金额;日常可根据需要完成以下查询要求:给出碟名,可查是否有货可供借出;给出供应商

34、,可查其以往供货情况练习2(续)请自行设计一个适合于互联网上的影视作品点播管理系统,制定业务规则及收费标准,并给出相应的用例图与主要的用例说明。练习3:学术会议论文管理系统组委会收到应征论文后,进行分类编号登记,审稿前打印分类目录和审稿单,按论文分类分送给相应的审稿人审阅;组委会收到审稿意见后,登录审稿结论(录用、不录用),并将结论及版面费金额通知作者;组委会收到作者版面费后进行登记;打印论文集目录(收到版面费的录用论文列入论文集)练习3(续)如果会议实行网上论文提交及网上论文评审,则用例图如何变化?练习4:彩票电话销售系统一个慈善团体通过周期性地发起彩票销售活动来筹集资金;该慈善团体实行会员

35、制。所有彩票仅在会员范围内发行;维护会员的各方面信息。除了常规联系信息外(地址、电话号码等),还包括会员第一次和最近一次参加活动的日期,以及他们参加活动的次数、不接电话的次数等历史信息。每个活动都在一个固定的时间段内进行,其后进行抽奖,并告知获奖者;每次活动进行中,所有彩票都唯一编号,且彩票总数、到目前为止卖出的彩票、以及每张彩票的当前状态(未卖出、被预订、购卖者等)都是已知的。每次活动按1%的比例设置中奖彩票,其中,一等奖1名,二等奖3名,其余为3等奖。奖金额分别为彩票面额的10倍、5倍和2倍。彩票电话销售系统(续)有大量电话销售员同时工作:他们每天向总管领取一份电话呼叫计划;根据电话呼叫计

36、划与客户交谈;记录交谈结果,包括:销售成功、销售不成功、无应答、忙、应答机、传真机、错号等成功预订时,记录会员订购彩票数量,并确认认购的彩票号码,如果会员提出,可以进行会员个人信息更新等。呼叫计划一般随机产生,在一次活动中,失败的联接也有再被呼叫的机会。考虑:如何电话销售员进行考核?需要设计哪些指标?要记录哪些信息?彩票电话销售系统(续)活动信息包括:活动代码,活动主题,开始日期,结束日期,抽奖日期,彩票数量,已售彩票数量彩票信息:彩票编号,彩票面额,彩票状态抽奖信息:奖金描述,奖金金额,奖金排序电话销售员:销售员ID,姓名会员:会员ID,会员姓名,电话号码,邮件地址,信用卡号电话呼叫计划:电

37、话号码,通话开始时间,结束时间、通话结果,成交数量Modeling Use-Case ActivitiesActivity diagram a diagram that can be used to graphically depict the flow of a business process, the steps of a use case, or the logic of an object behavior (method).类似于流程图,用于以图形化的方式描述一个业务过程或者一个用例的活动步骤的顺序流程。用法灵活,即可以在分析阶段辅助用例图建模,也可用于设计阶段辅助说明对象行为(方

38、法)的操作逻辑。One or more activity diagram can be constructed for each use case (more than one if use case is long or contains complex logic).实心点代表过程启动园角矩形代表需要执行的活动步骤箭头代表引发活动的触发器实心黑条是同步条,用以描述并行活动Modeling Use-Case ActivitiesActivity Diagram Notations活动图记号Initial node - solid circle : the start of the proce

39、ss.Actions rounded rectangles representing individual steps. The sequence of actions make up the total activity shown by the diagram.Flow - arrows on the diagram indicating the progression through the actions. Most flows do not need words to identify them unless coming out of decisions.Decision - di

40、amond shapes with one flow coming in and two or more flows going out. The flows coming out are marked to indicate the conditions.Merge - diamond shapes with multiple flows coming in and one flow going out. This combines flows previously separated by decisions. Processing continues with any one flow

41、coming into the merge.Activity Diagram Notations (cont.)Fork a black bar with one flow coming in and two or more flows going out. Actions on parallel flows beneath the fork can occur in any order or concurrently. Join a black bar with two or more flows coming in and one flow going out, noting the end of concurrent processing. All actions coming into the join mus

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论