The Dynamic Analysis Model StateCharts Prof. Hany H. Ammar, CSEE, WVU, and Dept. of Computer Science, Faculty of Computers and Information, Cairo University.

Slides:



Advertisements
Similar presentations
Requirements Elicitation and Use Case Diagrams
Advertisements

1 Chapter 4 Dynamic Modeling and Analysis (Part I) Object-Oriented Technology From Diagram to Code with Visual Paradigm for UML Curtis H.K. Tsang, Clarence.
1 Chapter 4 Dynamic Modeling and Analysis (Part I) Object-Oriented Technology From Diagram to Code with Visual Paradigm for UML Curtis H.K. Tsang, Clarence.
Interaction Diagrams Activity Diagram State Machine Diagram
More on Dynamic Models - Page L14-1 Full 2002M.E. Fayad Lesson 14: More about Dynamic Models Object- Oriented Modeling & Applications.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 5, Analysis: Dynamic Modeling.
© 2005 Prentice Hall12-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented design 2.
Software Engineering I Object-Oriented Design
Software Engineering I Object-Oriented Design Software Design Refinement Using Design Patterns Instructor: Dr. Hany H. Ammar Dept. of Computer Science.
THE OBJECT-ORIENTED DESIGN WORKFLOW Statechart Diagrams.
State Change Modelling. Aim: To introduce the concept and techniques for describing the changes in state that may occur to an object in its lifetime.
University of Toronto Department of Computer Science © Steve Easterbrook. This presentation is available free for non-commercial use with attribution.
Lecture 10 Topics: Sequential circuits Basic concepts Clocks
UML Diagrams: Sequence Diagrams The Requirements Model, and The Dynamic Analysis Model Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical.
UML Diagrams: Sequence Diagrams The Requirements Model, and The Dynamic Analysis Model Prof. Hany H. Ammar, CSEE, WVU, and Dept. of Computer Science, Faculty.
State and Sequence Diagrams Modelling dynamic information So far we have seen: Use Case Diagrams – requirements capture, interface.
Chapter 10 State Machine Diagrams
Software Design Refinement Using Design Patterns Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
1 Object-Oriented Modeling Using UML (2) CS 3331 Fall 2009.
Software Design The Dynamic Model Design Sequence Diagrams and Communication Diagrams Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical.
UML Diagrams: Class Diagrams The Static Analysis Model Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Guide to State Transition Diagram. 2 Contents  What is state transition diagram?  When is state transition diagram used?  What are state transition.
Dynamic Modeling Chapter 11 Part of Analysis Modeling Designing Concurrent, Distributed, and Real-Time Applications with UML Hassan Gomaa (2001)
UML Diagrams: Sequence Diagrams The Requirements Model, and The Dynamic Analysis Model Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical.
Object-Oriented Modeling Using UML CS 3331 Section 2.3 of Jia 2003.
1 Modeling interactions and behavior Lecturer Dr. Mai Fadel.
The Static Analysis Model Class Diagrams Prof. Hany H. Ammar, CSEE, WVU, and Dept. of Computer Science, Faculty of Computers and Information, Cairo University.
Information System Design IT60105
Software Design Refinement Using Design Patterns Part II The FSM and the StateChart Patterns Instructor: Dr. Hany H. Ammar Dept. of Computer Science and.
System Testing Beyond unit testing. 2 System Testing Of the three levels of testing, system level testing is closest to everyday experience We evaluate.
Introduction to OOAD and the UML
Dynamic Models. Outline Dynamic Models Statecharts –States –Transitions –Composite states Interaction Diagrams –Sequence Diagrams The time order of interactions.
State Modeling. Introduction A state model describes the sequences of operations that occur in response to external stimuli. As opposed to what the operations.
CS212: Object Oriented Analysis and Design Lecture 34: UML Activity and Collaboration diagram.
OMT Modeling 1. Object Model : presented by the object model and the data dictionary. 2. Dynamic Model: presented by the state diagrams and event flow.
States.
UML: State Chart Diagrams
CS3773 Software Engineering Lecture 06 UML State Machines.
DESIGN OF SOFTWARE ARCHITECTURE
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 26. Review UML behavioral Diagrams – Sequence diagram.
Finite State Machines (FSM) OR Finite State Automation (FSA) - are models of the behaviors of a system or a complex object, with a limited number of defined.
Prof. Hany H. Ammar, CSEE, WVU, and
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 10: Statecharts.
Modeling Object Lifecycles and State-Dependent Behavior ©SoftMoore ConsultingSlide 1.
Dynamic Models - Page L M.E. Fayad Lesson 30: Dynamic Models Object- Oriented Modeling & Application s.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 6: Restaurant.
State Modeling. Introduction A state model describes the sequences of operations that occur in response to external stimuli. As opposed to what the operations.
1 Object Oriented Analysis System modeling = Functional modeling + Object modeling + Dynamic modeling Functional modeling = Use cases Object modeling =class.
Systems Analysis and Design in a Changing World, Fourth Edition
Software Design Refinement Using Design Patterns
Instructor: Dr. Hany H. Ammar
UML Diagrams: Class Diagrams The Static Analysis Model
Instructor: Dr. Hany H. Ammar
State Machine Model.
Marlon Dumas Institute of Computer Science
Dynamic Modeling of Banking System Case Study - I
Dynamic Modeling of Banking System Case Study - II
Static and Dynamic Modeling Using UML
Instructor: Dr. Hany H. Ammar
State Machine Diagrams
Finite State Machines and Statecharts
CSC 422 Kutztown University Dr. Spiegel
States.
Unified Modeling Language
Finite State Machines and Statecharts
Chapter 5 state Modeling
States.
UML Diagrams: StateCharts The Dynamic Analysis Model
UML State Diagrams.
Presentation transcript:

The Dynamic Analysis Model StateCharts Prof. Hany H. Ammar, CSEE, WVU, and Dept. of Computer Science, Faculty of Computers and Information, Cairo University

outline The Requirements Model and the Analysis model The Analysis Model and the importance Statecharts Finite State Machines and Statecharts StateChart Elements Examples

The Requirements Model and the Analysis Model Static Analysis Dynamic Analysis Functional/ Nonfunctional Requirements Use Case Diagrams/ Sequence Diagrams (the system level) - Class Diagrams - State Diagrams/ Refined Sequence Diagrams (The object level) Requirements Elicitation Process The Analysis Process

The Analysis Model and the Importance of StateCharts StateCharts are particularly important for real-time systems, Control functions are typically activated at specific states of the system StateCharts model the dynamic behavior of an object (with multiple states of behavior) by showing the possible states that the object can be in (idle, busy, waiting for selection, timedout, processing_transactions, etc) In the analysis model a StateChart diagram is needed for each class of domain objects (including the system class) defined in the class diagram that has multiple states of behavior.

Example: StateChart for class Account in an ATM example

Example: StateChart for Class ATM_Controller (The system class) What are the limitations of this Diagram?

Finite State Machines and Statecharts Statechart Graphical representation of finite state machine–States are rounded boxes– Transitions are arcs Statechart relates events and states of a class of objects Event –Causes change of state Referred to as state transition State –A recognizable situation –Exists over an interval of time–Represents an interval between successive events

Finite State Machines (FSMs) and StateCharts (SCs) SCs are graphical representation of FSMs They can depict complex FSMs consisting of a hierarchy of state diagrams SCs consist of states and transitions A state depicts an actual state of behavior that an object can in during its life time A transition from one state to another is caused by an event (e.g., user input, received a message from another object, etc)

StateChart Rules States of an Object A recognizable situation Exists over an interval of time Represents an interval between successive events Can be a Macro state of a Micro state A Macro State is defined by another StateChart containing Macro and Micro states A Micro state is a primitive state not defined any Further

Example: Digital Sound Recorder User Interface subsystem Class Ciagram

Example: Digital Sound Recorder StateChart of MenuUserMode class

Events Event–A discrete signal that happens at a point in time –Also known as a stimulus –Has no duration Two events –May logically depend on each other –E.g, ATM Card inserted before Pin # entered Two events –May be independent of each other (they can occur independently) –E.g., Cancel

Events and Conditions State transition label – Event [Condition] Condition is a Boolean function – Conditions are optional on statecharts – Condition is true for finite period of time When event occurs, condition must be true for state transition to occur.

Actions Can be defined as state transition label –Event / action(s) –Event [condition] / action(s) Actions –Executed as a result of state transition –Executes instantaneously at state transition –T erminates itself Entry Actions –Defined for a given state and executes on entry to this state from any state Exit Actions –Defined for a given state and executes on exit from this state to any state

Example: Actions and Conditions, Auto Cruise Controller

Activities Activity –Executes for duration of state Enable Activity on entry to state Disable Activity on exit from state Examples of activities –Increase Speed Executes for duration of Accelerating state –Maintain Speed Executes for duration of Cruising state –Resume Cruising Executes for duration of Resuming state

Example: StateChart with Activities, Auto Cruise Controller

Example: Entry Actions, execute on the entry to a state after a state transition

Example: Exit Actions

Example: Macro States, Hierarchical StateCharts