资源预览内容
第1页 / 共34页
第2页 / 共34页
第3页 / 共34页
第4页 / 共34页
第5页 / 共34页
第6页 / 共34页
第7页 / 共34页
第8页 / 共34页
第9页 / 共34页
第10页 / 共34页
亲,该文档总共34页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
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 external 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 other 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 in 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 automated 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 implementation 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 consortium 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)7Modeling 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 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-level 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 Analysis 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 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 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-level 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 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 and 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
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号