资源预览内容
第1页 / 共22页
第2页 / 共22页
第3页 / 共22页
第4页 / 共22页
第5页 / 共22页
第6页 / 共22页
第7页 / 共22页
第8页 / 共22页
第9页 / 共22页
第10页 / 共22页
亲,该文档总共22页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
1,Dynamic Modeling of Banking System Case Study - II,Lecture # 39,2,Dynamic Modeling,There are two ways to model dynamic behavior One is the life history of one object as it interacts with the rest of the world; the other is the communication patterns of a set of connected objects as they interact to implement behavior,3,Dynamic Modeling,The view of an object in isolation is a state machine a view of an object as it responds to events based on its current state, performs actions as part of its response, and transitions to a new state This is displayed in state chart diagrams in UML,4,Dynamic Modeling,The view of a system of interacting objects is a collaboration, a context-dependent view of objects and their links to each other, together with the flow of messages between objects across data links Collaboration and sequence diagrams are used for this view in UML. Both of these combined are called interactive diagrams,5,Dynamic Modeling,The dynamic model depicts the interaction among the objects that participate in each use case The starting point for developing the dynamic model is the use case and the objects determined during object structuring,6,Todays Topics,Well talk about the second view today Well apply this to our Banking System application also But, first let us review our knowledge about interaction diagrams as defined in the UML,7,Interaction Diagrams,Interaction diagrams are used to model the dynamic aspects a system. For the most part, this involves modeling concrete or prototypical instances of classes, interfaces, components, and nodes, along with messages that are dispatched among them, all in the context of a scenario that illustrates a behavior,8,Interaction Diagrams,Interaction diagrams may stand alone to visualize, specify, construct, and document the dynamics of a particular society of objects, or they may be used to model one particular flow of control of a use case,9,Types of Interaction Diagrams,Sequence diagrams Collaboration diagrams,10,Sequence Diagrams,A sequence diagram is an interaction diagram that emphasizes the time ordering of messages Graphically, a sequence diagram is a table that shows objects arranged along the X axis and messages, ordered in increasing time, along the Y axis,11,Collaboration Diagrams,A collaboration diagram is an interaction diagram that emphasizes the structural organization of the objects that send and receive messages Graphically, a collaboration diagram is a collection of vertices and arcs,12,Hints and Tips on Interaction Diagrams,Give it a name that communicates its purpose Use a sequence diagram if you want to emphasize the time ordering of messages Use a collaboration diagram if you want to emphasize the organization of the objects involved in the interaction,13,Hints and Tips on Interaction Diagrams,Lay out its elements to minimize lines that cross Use notes and color as visual cues to draw attention to important features of your diagram,14,Collaboration Diagram: ATM Client Validate PIN Use Case,:BankServer,:CardReader,:CardReader Interface,:ATM Control,:ATMCard,:Customer Interface,:ATM Transaction,1: Card Reader Input,1.2: Card Inserted,1.1: Card Input Data,1.3: Get PIN,2.4: PIN Entered (Customer Info),2.6: Valid Valid PIN,2.5: Validate PIN (Customer Info),2.7a: Update Status,2.7: Display Menu,2.3: Customer Info,2.2: Card Data,2.1: Card Request,2: PIN Input,1.4: PIN Prompt 2.8: Selection Menu,15,Sequence Diagram: ATM Client Validate PIN Use Case - 1,:ATM Customer,:CardReader Interface,:ATMCard,:ATMControl,:Customer Interface,:ATM Transaction,:BankServer,1: Card Reader Input,1.2: Card Inserted,1.1: Card Input Data,1.3: Get PIN,1.4: PIN Prompt,16,Sequence Diagram: ATM Client Validate PIN Use Case - 2,:ATM Customer,:CardReader Interface,:ATMCard,:ATMControl,:Customer Interface,:ATM Transaction,:BankServer,2: PIN Input,2.2: Card Data,2.1: Card Request,2.3: Customer Info,2.4: PIN Entered,2.5: Validate PIN,2.6: Valid: Valid PIN,17,Sequence Diagram: ATM Client Validate PIN Use Case - 3,:ATM Customer,:CardReader Interface,:ATMCard,:ATMControl,:Customer Interface,:ATM Transaction,:BankServer,2.7: Display Menu,2.7a: Update Status,2.8: Selection Menu,18,Collaboration Diagram: ATM Client Withdraw Funds Use Case,19,Sequence Diagram: ATM Client Withdraw Funds Use Case,20,Consolidated Collaboration Diagram for ATM Client Subsystem,21,Summary,In the last lecture we introduced the dynamic modeling through statecharts In this lecture we have gone through the other aspect of dynamic modeling, i.e. Interaction diagrams We can model the interaction of objects through Sequence diagrams and Collaboration diagrams,22,References,Designing Concurrent, Distributed, and Real-Time Applications with UML by H. Gomaa, Addison-Wesley, 2000 The Unified Modeling Language User Guide by G. Booch, J. Rambaugh, & I. Jacobson, Addison-Wesley, 1998 The Unified Mod
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号