收藏 分销(赏)

建模与设计-03Use-case-Model.ppt

上传人:w****g 文档编号:14672101 上传时间:2026-10-27 格式:PPT 页数:61 大小:1.86MB 下载积分:10 金币
下载 相关
建模与设计-03Use-case-Model.ppt_第1页
第1页 / 共61页
建模与设计-03Use-case-Model.ppt_第2页
第2页 / 共61页


点击查看更多>>
资源描述
Slide Title,Articles and prepositions are not caps in titles,Unless,of course,the title starts with one,Proper names always have leading caps,Acronyms are always all caps,Fifth level,Capitalize the first word of all bullet items,This applies to sub-bullets too,Rose,Apex,and Ada,not ROSE,APEX,and ADA,*,Use-case Model:Writing Requirements In Context,Main Points,Use-Case Modeling,Actors,Use Case,Relationship,Steps to write a use case,Threemaintypesofuse cases,Case Study,What Is a Use-Case Model?,A model that describes a systems functional requirements in terms of use cases,A model of the systems intended functionality(use cases)and its environment(actors),View Report Card,Student,Register for Courses,Login,Use Case Diagrams,The UML provides use case diagram notation to illustrate the names of use cases,actors,and the relationships between them,Browse,Browser,Librarian,Update Catalog,Reserve book,Borrow copy of book,Return copy of book,Borrow Journal,Return Journal,Extend loan,Use Case Diagram(a Library System),Book Borrower,Journal Borrower,Main Points,Use-Case Modeling,Actors,Use Case,Relationship,Steps to write a use case,Threemaintypesofuse cases,Case Study,Actors,An actor is anything with behavior,including the system under discussion itself when it calls upon the services of other systems.,Primary and supporting actors will appear in the action steps of the use case text.,Actors are not only roles played by people,but organizations,software,and machines.,Actor Stereotype,Business Actor,Business Worker,Identifying Actors,When developing a use case model,identify the different roles played by the potential human users of the system,People play different roles at different times,E.g.A person can play the role of book borrower,librarian,browser or journal borrower at different times,Any person who interacts with the system will be represented by at least one actor in use case model,Typical Actors:,Roles that people play,Computer systems,Electrical or mechanical devices,Main Points,Use-Case Modeling,Actors,Use Case,Relationship,Steps to write a use case,Threemaintypesofuse cases,Case Study,Use case=“Story”,Writing use casesstories of using a systemis an excellent technique to understand and describe requirements.,Use Cases and Functional Requirements,Use cases are requirements(not all requirements).,Primarily they are functional requirements that indicate what the system will do.Use cases define a promise or contract of how a system will behave.,Use cases provide a structured way to help with requirements capture,Identify the actors,Find out what actors need from the system,Find out any other interactions the actors expect to have with the system,Goals and Brief Format Use Cases,Customers and end users have,goals,(,needs/requirements,)and want computer systems to help meet them.The goals are primarily the starting point of finding out use case,Brief format,Use cases are a mechanism to help keep it simple and understandable for all stakeholders.,Informally,they are stories of using a system to meet goals.,Here is an example,brief format,use case:,Process Sale:,A customer arrives at a checkout with items to purchase.The cashier uses the POS system to record each purchased item.The system presents a running total and line-item details.The customer enters payment information,which the system validates and records.The system updates inventory.The customer receives a receipt from the system and then leaves with the items.,Use Case,The,name,of a Use Case should be the main goal of the Use Case.,Use cases are fundamentally,a text form,although they can be written using graphic form.,In UML use-case diagrams,a use case is rendered as an ellipse.,Process Loan,UC Names,Every use case must have a name that distinguishes it from other use cases.,Rules of naming Use Case:,Verb+Noun,Place Order,Validate User,Business Use Case,Business use cases,are less commonly written.If done,they are created in the,Business Modeling,discipline as part of a large-scale business process reengineering effort,or to help understand the context of a new system in the business.,Business use case describes,a sequence of actions of a business,as a whole to,fulfill a goal of a business actor,(an actor in the business environment,such as a customer or supplier).,For example,in a restaurant,one business use case is,Serve a Meal.,Use Case Stereotype,Business use case,Business use case realization,Use case realization,UC Characteristics,这件事必须由一个参与者发起。不存在没有参与者的用例,用例不应该自动启动,也不应该主动启动另一个用例;,用例必然是以动宾短语形式出现的;,UC Characteristics,一个用例就是一个需求单元,分析单元,设计单元,开发单元,测试单元,甚至部署单元;,How to Find Use Cases,1.,Choose the system boundary,.Is it just a software application,the hardware and application as a unit,that plus a person using it,or an entire organization?,2.,Identify the primary actors,.Those that have user goals fulfilled through using services of the system.,3.For each,identify their user goals,.Raise them to the highest user goal level that satisfies the EBP guideline.,4.,Define use cases that satisfy user goals,;name them according to their goal.Usually,user goal-level use cases will be one-to-one with user goals,but there is at least one exception,as will be examined.,Identifying Use Cases,与用户交互,假设自己是参与者,与系统进行交互,确定用例和确定参与者不能截然分开,发现用例的一般原则:,参与者的主要任务是什么,?,参与者需要了解系统的什么信息,?,需要修改系统的什么信息,?,参与者是否需要把系统外部的变化通知系统,?,参与者是否希望系统把异常情况通知自己,?,Jacobson,提供的一些原则,:,Use-Case Specifications,Name,Brief description,Flow of Events,Relationships,Activity diagrams,Use-Case diagrams,Special requirements,Pre-conditions,Post-conditions,Other diagrams,Use-Case Specifications,.,Use-Case Model,Actors,Use Cases,UML:Include Relationship,Buy Items,Cashier,Customer,Pay By Credit,POST,Pay By Cash,Pay By Check,A include relationship from use case A to use case B indicates that A will also include the behavior as specified by B,similar behavior across use cases is identified after the use cases are specified,Another Example,UML:Extend Relationship,sometimes use cases are complex because they have many steps,Used when a second use case story follows the story of a prior use case,Extending a use case is,effectively,an,alternate,course of base use case,Introduce an extending use case whenever logic for an alternate course of action is at a complexity level similar to that of your basic course of action,(Continue),An extends relationship from use case A to use case B indicates that an instance of B may include(subject to specific conditions)the behavior specified by A,Another Example,UML:,Generalization,Relationship,Thedistinctionofthethree relationships,三者对用例关系的优化侧重点是不同的:,泛化侧重表示子用例间的互斥性;,包含侧重表示被包含用例对,Actor,提供服务的间接性;,扩展侧重表示扩展用例的触发不定性;,泛化与包含用例属于无条件发生的用例,而扩展属于有条件发生的用例。进一步,用例的存在是为,Actor,提供服务,但用例提供服务的方式可分为间接和直接两种,依据于此,泛化中的子用例提供的是直接服务,而包含中的被包含用例提供的是间接服务。同样,扩展用例提供的也是直接服务,但扩展用例的发生是有条件的。,关系类型,说明,表示符号,关联,actor,与,use case,之间,泛化,actor,之间或,use case,之间,包含,use case,之间,扩展,use case,之间,Main Points,Use-Case Modeling,Actors,Use Case,Relationship,Steps to write a use case,Threemaintypesofuse cases,Case Study,Steps to write a use case(Important),Step 1:,Find the boundaries of the system(Context diagram,In/out list).,Step 2:,Brainstorm and list the primary actors.(Actor List),Step 3:,Brainstorm and list the primary actors goals against the system.(Actor-Goal List),Step 4:,Write the outermost summary level use cases covering all the above.,Step 5:,Reconsider&revise the strategic use cases.Add,subtract,merge goals.,Step 6:,Pick a use case to expand or write a narrative to get acquainted with the material.,Steps to write a use case(Continue),Step 7:,Fill in the stakeholders,interests,preconditions and guarantees.Double check them.,Step 8:,Write the main success scenario.Check it against the interests and the guarantees.,Step 9:,Brainstorm and list possible failure conditions and alternate success conditions.,Step 10:,Write how the actors and system should behave in each extension.,Step 11:,Break out any sub use case that needs its own space.,Step 12:,Start from the top and readjust the use cases.Add,subtract,merge.Double check for completeness,readability,failure conditions.,Use Case Traps,Too many use cases,Highly complex use cases,GUI-containing use cases,Data definitions or algorithms in use cases,Use cases users don,t understand,New business processes,ThedifferencebetweenUC andfunctions,功能性观点,说明事物可利用的价值,用例观点,是使用者的观点,说明事物对于使用者的意义,以及使用者可以怎么使用它,得到什么样的利益。,Main Points,Use-Case Modeling,Actors,Use Case,Relationship,Steps to write a use case,Threemaintypesofuse cases,Case Study,Threemaintypesofuse cases,Business use case diagram,使用业务主角和业务用例展现业务建模的结果。,Conception use case diagram,用于展现从业务用例中经过分析分解出来的关键概念用例,并表示概念用例和业务用例之间的关系。一般来说这些关系有扩展、包含和精化。,System use case diagram,展现系统范围,将对业务用例进行分析以后得到的系统用例展现出来,系统用例视图即是系统的开发范围。,Business use case diagram,Conception use case diagram,System use case diagram,Main Points,Use-Case Modeling,Actors,Use Case,Relationship,Steps to write a use case,Threemaintypesofuse cases,Case Study,确定系统涉及的总体信息,图书馆管理系统是对书籍的借阅及读者信息进行统一管理的系统,具体包括:,借阅者,的借书、还书、书籍预订;,图书馆管理员,的书籍借出处理、书籍归还处理、预订信息处理;,系统管理员,的系统维护,包括增加书目、删除或更新书目、增加书籍、减少书籍、增加读者账户信息、删除或更新读者账户信息、书籍信息查询、读者信息查询等。,Case Study:Library Management System,确定系统的参与者,确定参与者首先需要分析系统所涉及的问题领域,明确系统运行的主要任务:分析使用该系统主要功能的是哪些人,谁需要该系统的支持以完成其工作,还有系统的管理者与维护者。或更新读者账户信息、书籍信息查询、读者信息查询等。,Case Study:Library Management System,确定系统的参与者,作为一个图书馆管理系统,首先需要读者(借阅者)的参与,读者可以登录系统查询所需要的书籍,查到所需书籍后可以考虑预订,当然最重要的是借书、还书操作。,对于系统来说,读者发起的借书、还书等操作最终还需要图书馆管理员来处理,他们还可以负责图书的预订和预订取消。,对于图书馆管理系统来说,系统的维护操作也是相当重要的,维护操作主要包括增加书目、删除或更新书目、增加书籍、减少书籍等操作。,由以上分析可以得出,系统的参与者主要有,3,类:读者(也可称为借阅者)、图书馆管理员、图书馆管理系统维护者。,Case Study:Library Management System,确定系统用例,用例是系统参与者与系统在交互过程中所需要完成的事务,一个完整的需求分析,要求必须找出所有的用例。,识别用例最好的方法就是从分析系统的参与者开始,考虑每个参与者是如何使用系统的。,由于系统存在借阅者、图书馆管理员、系统维护人员,3,个参与者,所以在识别用例的过程中,可以将系统分为,3,个用例图分别考虑。,根据参与者之间的关系也可以将系统的用例图合为一张,这样画出的用例图略显复杂,为简单起见,我们将系统的用例图分为,3,个分别介绍。,Case Study:Library Management System,确定系统用例,借阅者请求服务的用例,登录系统;,查询自己的借阅信息;,查询书籍信息;,预订书籍;,借阅书籍;,归还书籍。,Case Study:Library Management System,确定系统用例,图书馆管理员处理借书、还书等的用例,处理书籍借阅;,处理书籍归还;,删除预订信息。,Case Study:Library Management System,确定系统用例,系统管理员进行系统维护的用例,查询借阅者信息;,查询书籍信息;,增加书目;,删除或更新书目;,增加书籍;,删除书籍;,添加借阅者账户;,删除或更新借阅者账户。,Case Study:Library Management System,图书馆管理系统中的用例图,借阅者请求服务的用例图,Case Study:Library Management System,图书馆管理系统中的用例图,图书馆管理员处理借书、还书等的用例图,Case Study:Library Management System,图书馆管理系统中的用例图,系统管理员进行系统维护的用例图,Case Study:Library Management System,Practice:Online shoppingsystem,以在线购物(Online Shopping)进行领域分析构系统用例图;,在线购物通过会员机制维护客户,客户登录系统,分类浏览商品信息,选择多个目标商品形成订单,最后选择配送方式,并通过银行在线支付完成交易;,同时满足游客,会员,管理员的应用;,Homework,目标:,构建一个语音邮箱系统,问题描述:,语音邮箱系统中,可以为每个系统用户,(,邮箱主人,),分配一个语音邮箱号码,.,进行留言时,拨打语音邮箱系统的主号码,在听到提示音”请输入邮箱号”后,输入要语音邮箱号,听到主人设定的问候语后,进行留言然后挂断电话,.,邮箱主人拨打语音邮箱系统的主号码,在听到提示音”请输入邮箱号”后,输入要语音邮箱号,听到主人设定的问候语后,输入密码,+#,进行邮箱管理,.,此时系统提供三种服务,:1.,接收信息,;2.,更改问候语,;3.,更改密码,.,其中接收留言包括收听新留言、存储留言、删除留言等。,
展开阅读全文

开通  VIP、SVIP  下载更划算
下载10份以上建议开通 VIP 会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传

当前位置:首页 > 包罗万象 > 大杂烩

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        关注我们

©2010-2026 宁波自信网络信息技术有限公司  版权所有

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服