lecture09
Post on 18-Nov-2014
1.063 Views
Preview:
DESCRIPTION
TRANSCRIPT
Computer Engineering Department
Computer Engineering Department
Object Oriented Software Modeling and Design
CE 350Abdel-Karim Al-Tamimi, Ph.D.
altamimi@yu.edu.johttp://faculty.yu.edu.jo/
altamimi
Al-Tamimi 2011 © 1
Overview
• Dynamic Analysis Technique
Al-Tamimi 2011 © 2
Dynamic Analysis Technique
• Three steps for developing sequence diagram:– Modeling External System Behaviors– Modeling Communication among the
Subsystems– Developing Reusable
Model/View/Control (MVC) Software Framework
Al-Tamimi 2011 © 3
Modeling External System Behavior
• As the flow of events in the use-case description only records the external behaviors of the system, 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
• In fact, this mapping process can be automated by a UML CASE tool
Al-Tamimi 2011 © 4
Modeling Communications Among Subsystems
• Modeling and analyzing complex systems often involve many objects even for the realization of a single use case
• To 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
• In order to manage the complexity associated with large and complex systems, it is advantageous to package objects into several subsystems
• For 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 consortium’s system which is in turn connected to the systems of individual banks
Al-Tamimi 2011 © 5
Modeling Communications Among Subsystems
Al-Tamimi 2011 © 6
Modeling Communications Among Subsystems
Al-Tamimi 2011 © 7
Developing Reusable Model/View/Control (MVC) Software
Framework• At this point you will have developed the
system-level sequence diagram and may have also developed a subsystem-level sequence diagram
• We should then develop a detailed sequence diagram in three tiers, involving three types of objects: boundary, control and entity objects
Al-Tamimi 2011 © 8
The Dynamic Modeling and Analysis Process
• Developing use case scenarios• Developing system-level sequence
diagrams• Developing subsystem-level sequence
diagrams (optional for simple system)• Developing subsystem-level state chart
diagrams (optional for simple system)• Developing three-tier sequence diagrams• Developing three-tier collaboration
diagrams (optional)• Developing a state chart diagram for each
of these active (control) objects
Al-Tamimi 2011 © 9
The Dynamic Modeling and Analysis Process
Al-Tamimi 2011 © 10
Use Case Model
Use Case Description
Use 1
Flow of Events:
1. event 1;2. event 2;3. ......N. etc.
Flow of EventsActor input System Responseinput1 response 1input 2 response 2 response 3input 3 .....
Use Case Description
Refined Flow of Events
The Dynamic Modeling and Analysis Process
Al-Tamimi 2011 © 11
System-LevelSequence Diagram
Subsystem-Level State Diagram
Subsystem-LevelSequence Diagram
Flow of EventsActor input System Responseinput1 response 1input 2 response 2 response 3input 3 .....
Refined Flow of Events
The Dynamic Modeling and Analysis Process
Al-Tamimi 2011 © 12
Subsystem-Level State Diagram
State Machine for Elaborating the Control Object
3-TierSequence Diagram
3-Tier Collaboration Diagram
Developing Use Case Scenarios
Example: ATM System• Flow of Events – User inserts card– System prompts user to enter PIN– User enters PIN– System prompts user to select services– User selects service - withdraw money– System prompts user to enter withdrawal amount– User enters withdrawal amount– System displays “withdrawal successful” message,
ejects card and dispenses money– User collects card and money
Al-Tamimi 2011 © 13
Developing System Level Sequence Diagram
Al-Tamimi 2011 © 14
Flow of EventsActor Input System Response
User inserts card
System prompts user to enter PIN
User enters PIN
System prompts user to select services
User selects “withdraw money” service
System prompts user to enter the amount
User enters the withdrawal amount
System displays “withdrawal successful” message, ejects card and dispenses money
User collects the card and money
Developing System Level Sequence Diagram
Al-Tamimi 2011 © 15
Developing Subsystem Level Sequence Diagram
Al-Tamimi 2011 © 16
Developing Subsystem Level State Diagram
• With the subsystem-level sequence diagram created in Step 2, we can develop the subsystem-level state diagram for the scenario
• Let us again use the ATM as an example. When the ATM is idle, it shows a main screen, for example, the welcome screen. If the user inserts a valid ATM card, it will display a “wait for input PIN” screen
Al-Tamimi 2011 © 17
Developing Subsystem Level State Diagram
(Screen Object)
Al-Tamimi 2011 © 18
Initial stateStep 0
Step 7
Step 1
Step 4
Step 6 Step 5
Step 3
Step 2
Developing 3-Tier Sequence Diagram
• Identify Boundary, Control and Entity Objects – Message to and from the actor =>
boundary objects • e.g. insert card => card reader
– Information retrieval/ update => entity object
• e.g. verify card => account– Management of transactions =>
control objects • e.g. ATM controller
Al-Tamimi 2011 © 19
Developing Subsystem Level State Diagram
Al-Tamimi 2011 © 20
Developing Subsystem Level State Diagram
Al-Tamimi 2011 © 21
Developing Subsystem Level State Diagram
Al-Tamimi 2011 © 22
Developing Subsystem Level State Diagram
Al-Tamimi 2011 © 23
Al-Tamimi 2011 © 24
Tips and Tricks
Al-Tamimi 2011 © 25
View Alignment between Sequence Diagram and State
Diagram
Al-Tamimi 2011 © 26
Refining Class Diagram Using MVC-Level Scenario
Analysis• Creating Cohesive and Self-sufficient
Subsystems– Subsystems may be considered as the next level of
abstraction down from the entire system – Ideally, a subsystem should be a cohesive and
independent part of the complex system, so as to bring out the benefits of portability, reusability and maintainability
– A cohesive and independent subsystem is loosely coupled with other subsystems, and data coupling is the most loosely-coupled communication method between entities
Al-Tamimi 2011 © 27
Al-Tamimi 2011 © 28
Resources
• Chapter 4, Object-Oriented Technology: From diagram to code with Visual Paradigm for UML, and its slides
Al-Tamimi 2011 © 29
top related