高级面向对象ch4_2

上传人:kms****20 文档编号:51463667 上传时间:2018-08-14 格式:PPT 页数:34 大小:2.46MB
返回 下载 相关 举报
高级面向对象ch4_2_第1页
第1页 / 共34页
高级面向对象ch4_2_第2页
第2页 / 共34页
高级面向对象ch4_2_第3页
第3页 / 共34页
高级面向对象ch4_2_第4页
第4页 / 共34页
高级面向对象ch4_2_第5页
第5页 / 共34页
点击查看更多>>
资源描述

《高级面向对象ch4_2》由会员分享,可在线阅读,更多相关《高级面向对象ch4_2(34页珍藏版)》请在金锄头文库上搜索。

1、1Chapter 4 Dynamic Modeling and Analysis (Part II)Object-Oriented Technology From Diagram to Code with Visual Paradigm for UML2Dynamic Analysis TechniquesnHow can we transform from “what the system does” (requirements) to “how the system is implemented”? (implementation)nUse case captures the extern

2、al observable behaviors of the system.nNeed to know what objects are involved.nSource of hints:nUser interactions with the system n Boundary objectsnInformation retrieval/updated n Entity objectsnManagement of control flow and transaction n control objectsnData transformation, algorithm, etc. n othe

3、r utility objects3Dynamic Analysis Techniques (contd)nThree steps for developing sequence diagram:nModeling External System BehaviorsnModeling Communication among the SubsystemsnDeveloping Reusable Model/View/Control (MVC) Software Framework4Modeling External System BehaviorsnAs the flow of events i

4、n the use case description only records the external behaviors of the system and identifies the user inputs and system responses from the flow of events of a scenario, it is a straightforward process to map the scenario to a system-level sequence diagram. nIn fact, this mapping process can be automa

5、ted by a UML CASE tool. 5Modeling Communication among the SubsystemsnModeling and analyzing complex systems often involve many objects even for the realization of a single use case. nTo develop a detailed sequence diagram based on the system- level sequence diagram with sufficient information for im

6、plementation in one go generally requires a lot of effort. nIn order to manage the complexity associated with large and complex systems, it is advantageous to package objects into several subsystems. nFor example, an ATM system may be organized as a number of subsystems like the ATM, the bank consor

7、tium and the bank. Such an organization also reflects how the real-world hardware and software systems are configured, since the ATMs are connected to the bank consortiums system which is in turn connected to the systems of individual banks.6Modeling Communication among the Subsystems (contd)7Modeli

8、ng Communication among the Subsystems (contd)8Developing Reusable Model/View/Control (MVC) Software FrameworknAt this point you will have developed the system-level sequence diagram and may have also developed a subsystem-level sequence diagram. nWe should then develop a detailed sequence diagram in

9、 three tiers, involving three types of objects: boundary, control and entity objects. 9The Dynamic Modeling and Analysis ProcessnDeveloping use case scenariosnDeveloping system-level sequence diagramsnDeveloping subsystem-level sequence diagrams (optional for simple system)nDeveloping subsystem-leve

10、l statechart diagrams (optional for simple system)nDeveloping three-tier sequence diagramsnDeveloping three-tier collaboration diagrams (optional)nDeveloping a statechart diagram for each of these active (control) objects10The Dynamic Modeling and Analysis Process (contd)11The Dynamic Modeling and A

11、nalysis Process (contd)12The Dynamic Modeling and Analysis Process (contd)13Developing Use Case ScenariosnExample ATM SystemnFlow of Events nUser inserts cardnSystem prompts user to enter PINnUser enters PINnSystem prompts user to select servicesnUser selects service - withdraw moneynSystem prompts

12、user to enter withdrawal amountnUser enters withdrawal amountnSystem displays “withdrawal successful” message, ejects card and dispenses moneynUser collects card and money 14Developing System-level Sequence DiagramsFlow of EventsActor InputSystem ResponseUser inserts cardSystem prompts user to enter

13、 PINUser enters PINSystem prompts user to select servicesUser selects “withdraw money” serviceSystem prompts user to enter the amountUser enters the withdrawal amountSystem displays “withdrawal successful” message, ejects card and dispenses moneyUser collects the card and money15Developing System-le

14、vel Sequence Diagrams (contd)16Developing Subsystem-level Sequence Diagrams (optional)17Developing Subsystem-level Statechart diagram nWith the subsystem-level sequence diagram created in Step 2, we can develop the subsystem-level statechart diagram for the scenario. nLet us again use the ATM as an

15、example. When the ATM is idle, it shows a main screen, for example, the welcome screen. nIf the user inserts a valid ATM card, it will display a “wait for input PIN” screen. 18Developing Subsystem-level Statechart diagram (contd)19Developing Three-tier Sequence DiagramsnIdentify Boundary, Control an

16、d Entity Objects nMessage to and from the actor = boundary objects, e.g. insert card = card readernInformation retrieval/ update = entity object, e.g. verify card = accountnManagement of transaction = control objects, e.g. ATM controller20Developing Three-tier Sequence Diagrams (contd)21Developing Three-tier Sequence Diagrams (contd)22Developing Three-tier Sequence Diagrams (contd)23Developing Three-tier Sequence Diagrams (contd)24Developing Three-tier Collaboration Diagram2

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 生活休闲 > 科普知识

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号