軟件工程英文教學(xué)課件:Ch7 Requirements Modeling Flow and Behavior_第1頁(yè)
軟件工程英文教學(xué)課件:Ch7 Requirements Modeling Flow and Behavior_第2頁(yè)
軟件工程英文教學(xué)課件:Ch7 Requirements Modeling Flow and Behavior_第3頁(yè)
軟件工程英文教學(xué)課件:Ch7 Requirements Modeling Flow and Behavior_第4頁(yè)
軟件工程英文教學(xué)課件:Ch7 Requirements Modeling Flow and Behavior_第5頁(yè)
已閱讀5頁(yè),還剩35頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

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教材管理系統(tǒng)的頂層DFD學(xué)生教材購(gòu)銷(xiāo)管理系

10、統(tǒng)書(shū) 庫(kù)保管員購(gòu)書(shū)單領(lǐng)書(shū)單缺書(shū)單進(jìn)書(shū)通知Constructing DFDExample教材管理系統(tǒng)可分為:銷(xiāo)售子系統(tǒng)和采購(gòu)子系統(tǒng)銷(xiāo)售子系統(tǒng):由教師或?qū)W生提交購(gòu)書(shū)單,經(jīng)教材科發(fā)行人員審核是有效購(gòu)書(shū)單后,開(kāi)發(fā)票、登記并返給學(xué)生領(lǐng)書(shū)單,學(xué)生憑領(lǐng)書(shū)單領(lǐng)書(shū)。采購(gòu)子系統(tǒng):若是脫銷(xiāo)教材,則登記缺書(shū)信息,并發(fā)缺書(shū)單給書(shū)庫(kù)采購(gòu)人員;一旦新書(shū)入庫(kù)后,即發(fā)進(jìn)書(shū)通知告知系統(tǒng)。15學(xué)生書(shū) 庫(kù)保管員第一層DFD圖教材管理系統(tǒng)購(gòu)書(shū)單領(lǐng)書(shū)單1銷(xiāo) 售2采購(gòu)進(jìn)書(shū)通知F2: 缺書(shū)登記表F1: 教材存量表缺書(shū)單進(jìn)書(shū)通知Constructing DFDExample16Constructing DFDExample1.1 審 查有效性

11、1.2 開(kāi)發(fā)票有效 購(gòu)書(shū)單1.3 開(kāi)領(lǐng)書(shū)單發(fā)票1.4 登記缺書(shū)1.5 補(bǔ)售教材F2: 缺書(shū)登記表學(xué)生學(xué)生無(wú)效書(shū)單領(lǐng)書(shū)單領(lǐng)書(shū)單F3: 各班學(xué)生用書(shū)表F4: 售書(shū)登記表 補(bǔ)售書(shū)單 暫缺書(shū)單采購(gòu)子系統(tǒng)第二層DFD圖銷(xiāo)售子系統(tǒng)F1: 教材存量表進(jìn)書(shū)通知17Constructing DFDExample2.3 修改教材庫(kù)存和待購(gòu)量2.1 按 書(shū) 號(hào) 匯總?cè)睍?shū)F2: 缺書(shū)登記表銷(xiāo)售子系統(tǒng)書(shū)庫(kù)保管員F1: 教材存量表進(jìn)書(shū)通知第二層DFD圖采購(gòu)子系統(tǒng)2.2 按出版社 統(tǒng)計(jì)缺書(shū)F5: 待購(gòu)教材表F6: 教材一覽表進(jìn)書(shū)通知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一種介于自然語(yǔ)言和形式化語(yǔ)言之間的語(yǔ)言。結(jié)構(gòu)化語(yǔ)言的詞匯表由 英語(yǔ)命令動(dòng)詞 數(shù)據(jù)詞典中定義的名字語(yǔ)言的正文用基本控制結(jié)構(gòu)進(jìn)行分割,加工中的操作用自然語(yǔ)言短語(yǔ)來(lái)表示?;究刂平Y(jié)構(gòu)有三種:簡(jiǎn)單陳述句結(jié)構(gòu);重復(fù)結(jié)構(gòu):while_do 或 repeat_until 結(jié)構(gòu);判定結(jié)構(gòu):if_then_else 或 case_of 結(jié)構(gòu)

14、。23Structured Language - Example“檢查發(fā)貨單”的過(guò)程描述if 發(fā)貨單金額超過(guò)$500 then if 欠款超過(guò)60天 then 在償還欠款前不予批準(zhǔn) else (欠款未超期) 發(fā)批準(zhǔn)書(shū),發(fā)貨單 else (發(fā)貨單金額未超過(guò)$500) if 欠款超過(guò)60天 then 發(fā)批準(zhǔn)書(shū),發(fā)貨單及賒欠報(bào)告 else (欠款未超期) 發(fā)批準(zhǔn)書(shū),發(fā)貨單24判定表的構(gòu)造方法:1)列出與一個(gè)具體過(guò)程有關(guān)的全部操作。2)列出該過(guò)程執(zhí)行期間的所有條件或作出的判定3)找出每個(gè)可能的組合,將各組特定的條件與特定操作相結(jié)合,并消去那些不可能發(fā)生的條件組合。4)指出在什么樣的一組條件下將采取什么

15、樣的操作。 如果算法中包含多重嵌套的條件選擇時(shí),用判定表能清晰地表達(dá)條件組合與動(dòng)作之間的對(duì)應(yīng)關(guān)系.Control Specification- Decision Table25Control Specification- Decision Tree判定樹(shù)與判定表的邏輯處理相似,但比判定表的語(yǔ)義表達(dá)上更直觀。判定樹(shù)中,每個(gè)枝節(jié)點(diǎn)(子樹(shù)的根)對(duì)應(yīng)于一個(gè)判定條件,而葉節(jié)點(diǎn)則對(duì)應(yīng)于系統(tǒng)的一個(gè)可能的動(dòng)作。判定樹(shù)中,從根到葉的每條路徑上所有枝節(jié)點(diǎn)對(duì)應(yīng)于一種條件組合取值下的特定動(dòng)作。 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 時(shí)序圖 時(shí)序圖用于描述對(duì)象與對(duì)象之間動(dòng)態(tài)的交互關(guān)系,著重體現(xiàn)對(duì)象間消息

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論