




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、1Chapter 7Requirements Modeling: Flow and BehaviorSoftware Engineering: A Practitioners Approach, 7/e by Roger S. Pressman2Requirements Modeling StrategiesOne view of requirements modeling, called structured analysis, considers data and the processes that transform the data as separate entities. Dat
2、a objects are modeled in a way that defines their attributes and relationships. Processes that manipulate data objects are modeled in a manner that shows how they transform data as data objects flow through the system. A second approach to analysis modeled, called object-oriented analysis, focuses o
3、n the definition of classesthey collaborate with one another to effect customer requirements.3Flow-Oriented ModelingRepresents how data objects are transformed at they move through the systemdata flow diagram (DFD) is the diagrammatic form(图解形式) that is usedConsidered by many to be an “old school” a
4、pproach, but continues to provide a view of the system that is uniqueit should be used to supplement other analysis model elements4Flow Modeling Notationexternal entityprocessdata flowdata store5External EntityA producer or consumer of dataExamples: a person, a device, a sensorData must always origi
5、nate somewhereand must always be sent to something6ProcessA data transformer (changes inputto output)Examples: compute taxes, format report, display graph Data must always be processed in some way to achieve system function7Data FlowData flows through a system, beginningas input and transformed into
6、 putetriangle areabaseheightarea8Data StoresData is stored for later use.look-upsensordatasensor #report requiredsensor #, type, location, agesensor datasensor numbertype, location, age9Data Flow Diagramming: Guidelinesall icons must be labeled with meaningful namesthe DFD evolves through a number o
7、f levelsalways begin with the level 0do not represent procedural logicsourcedestination1A2B3Ccefdbab2.12.22.3de1F10Constructing a DFDIreview user scenarios and/or the data model to isolate data objects and use a grammatical parse to determine “operations”determine external entities (producers and co
8、nsumers of data)create a level 0 DFD11Level 0 DFD Exampleuserprocessing requestvideosourceNTSCvideo signaldigitalvideoprocessorrequestedvideosignalmonitorConstructing a DFDI12Constructing a DFDIIto determine next level transformsEach sub-DFD provides a more detailed description “balance” the flow to
9、 maintain data flow continuityeach Process is refined until it does just one thingmost systems require between 3 and 7 levels for an adequate flow modela single data flow item (arrow) may be expanded as levels increase13The Data Flow HierarchyPabxyp1p2p3p4p5abcdefglevel 0level 1教材管理系统的顶层DFD学生教材购销管理系
10、统书 库保管员购书单领书单缺书单进书通知Constructing DFDExample教材管理系统可分为:销售子系统和采购子系统销售子系统:由教师或学生提交购书单,经教材科发行人员审核是有效购书单后,开发票、登记并返给学生领书单,学生凭领书单领书。采购子系统:若是脱销教材,则登记缺书信息,并发缺书单给书库采购人员;一旦新书入库后,即发进书通知告知系统。15学生书 库保管员第一层DFD图教材管理系统购书单领书单1销 售2采购进书通知F2: 缺书登记表F1: 教材存量表缺书单进书通知Constructing DFDExample16Constructing DFDExample1.1 审 查有效性
11、1.2 开发票有效 购书单1.3 开领书单发票1.4 登记缺书1.5 补售教材F2: 缺书登记表学生学生无效书单领书单领书单F3: 各班学生用书表F4: 售书登记表 补售书单 暂缺书单采购子系统第二层DFD图销售子系统F1: 教材存量表进书通知17Constructing DFDExample2.3 修改教材库存和待购量2.1 按 书 号 汇总缺书F2: 缺书登记表销售子系统书库保管员F1: 教材存量表进书通知第二层DFD图采购子系统2.2 按出版社 统计缺书F5: 待购教材表F6: 教材一览表进书通知18Maps intoDFDs: A Look Aheadanalysis modeldes
12、ign model19Process Specification (PSPEC)PSPECNarration(叙述法)pseudocode (PDL)equationstablesdiagrams and/or chartsbubble20Process Specification (PSPEC)21Control Specification (CSPEC)Represents “events” and the processes that manage events. An “event” is a Boolean condition.The CSPEC can be:state diagr
13、am (sequential spec)structured languagedecision table/tree activation tablescombinatorial spec22Control Specification- Structured Language一种介于自然语言和形式化语言之间的语言。结构化语言的词汇表由 英语命令动词 数据词典中定义的名字语言的正文用基本控制结构进行分割,加工中的操作用自然语言短语来表示。基本控制结构有三种:简单陈述句结构;重复结构:while_do 或 repeat_until 结构;判定结构:if_then_else 或 case_of 结构
14、。23Structured Language - Example“检查发货单”的过程描述if 发货单金额超过$500 then if 欠款超过60天 then 在偿还欠款前不予批准 else (欠款未超期) 发批准书,发货单 else (发货单金额未超过$500) if 欠款超过60天 then 发批准书,发货单及赊欠报告 else (欠款未超期) 发批准书,发货单24判定表的构造方法:1)列出与一个具体过程有关的全部操作。2)列出该过程执行期间的所有条件或作出的判定3)找出每个可能的组合,将各组特定的条件与特定操作相结合,并消去那些不可能发生的条件组合。4)指出在什么样的一组条件下将采取什么
15、样的操作。 如果算法中包含多重嵌套的条件选择时,用判定表能清晰地表达条件组合与动作之间的对应关系.Control Specification- Decision Table25Control Specification- Decision Tree判定树与判定表的逻辑处理相似,但比判定表的语义表达上更直观。判定树中,每个枝节点(子树的根)对应于一个判定条件,而叶节点则对应于系统的一个可能的动作。判定树中,从根到叶的每条路径上所有枝节点对应于一种条件组合取值下的特定动作。 26Decision Table/Tree - Examples 27Behavioral Modeling & State
16、 RepresentationThe behavioral model indicates how software will respond to external events or stimuli. In the behavioral modeling, two different characterizations of states must be considered: the state of each class as the system performs its functionthe state of the system as observed from the out
17、side as the system performs its functionThe state of a class takes on both passive and active characteristics. A passive state is the current status of all of an objects attributes.The active state of an object indicates the current status of the object as it undergoes a continuing transformation. 2
18、8The States of a Systemstatea set of observable circumstances that characterizes the behavior of a system at a given timestate transitionthe movement from one state to anothereventan occurrence that causes the system to exhibit some predictable form of behavioractionprocess that occurs as a conseque
19、nce of making a transition29State Diagram Example - Elevator30Behavioral Modeling & Sequence Diagram make a list of the different states of a system (How does the system behave?)indicate how the system makes a transition from one state to another (How does the system change state?)draw a sequence diagram31The Interaction ModelComposed of four elements: use-cases sequence diagrams state diagrams a user interface prototypeEach of these is an important UML notation2022/7/1832 时序图 时序图用于描述对象与对象之间动态的交互关系,着重体现对象间消息
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 代码编程科普活动方案
- 代账公司端午活动方案
- 以赛带学活动方案
- 仲夏狂欢活动方案
- 企业一对一帮扶活动方案
- 企业三零服务活动方案
- 企业从事营利活动方案
- 企业公司交流活动方案
- 企业冬季团建活动方案
- 企业单位插花活动方案
- JT∕T 1495-2024 公路水运危险性较大工程专项施工方案编制审查规程
- 环保项目运维服务合同
- 江西联创光电超导应用有限公司2023年度财务报表审计报告书
- 2024年全国统计师之初级统计基础理论及相关知识考试重点试卷(附答案)
- 茶园商业计划书
- 四川省巴中市2023-2024学年八年级上学期期末考试英语试卷
- SF-36生活质量调查表(SF-36-含评分细则)
- 2024年经内镜消化系统常见恶性肿瘤组织取样及类器官培养专家共识(完整版)
- 中国古建筑文化与鉴赏智慧树知到期末考试答案章节答案2024年清华大学
- 广东省汕尾市海丰县2024年数学八年级下册期末学业水平测试模拟试题含解析
- 阴囊佩吉特病
评论
0/150
提交评论