State Machines State diagrams SE-2030 Dr. Rob Hasker 1 Based on slides written by Dr. Mark L. Hornick Used with permission.

Slides:



Advertisements
Similar presentations
Behavioral Modeling: State Diagrams CIS 4800 Kannan Mohan Department of CIS Zicklin School of Business, Baruch College Copyright © 2009 John Wiley & Sons,
Advertisements

ZEIT2301 Design of Information Systems Behavioural Design: State Machines School of Engineering and Information Technology Dr Kathryn Merrick.
SE-2840 Dr. Mark L. Hornick 1 HTML input elements and forms.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 04. Other.
Lecture 12: Chapter 22 Topics: UML (Contd.) –Relationship Structural Behavioral –Diagram Structural Behavioral.
More on Dynamic Models - Page L14-1 Full 2002M.E. Fayad Lesson 14: More about Dynamic Models Object- Oriented Modeling & Applications.
SE 555 Software Requirements & Specification 1 Activity Diagrams.
Introduction to UML Part 2 Behavioral Modeling. Sequence (event) diagram Describes object interaction Typically captures behavior of a single use case.
March R. McFadyen1 Statechart Diagram A Statechart Diagram describes states for an object how/why an objects’ state changes A Statechart Diagram.
Slide 1 Systems Analysis & Design CS183 Spring Semester Dr. Jonathan Y. Clark Course Website:
State Diagram. What is State Diagram?  State diagram is used to show the state space of a given class, the events that cause a transition from one state.
THE OBJECT-ORIENTED DESIGN WORKFLOW Statechart Diagrams.
UML Sequence Diagrams Eileen Kraemer CSE 335 Michigan State University.
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.
An Introduction to Rational Rose Real-Time
UML Sequence Diagrams Michael L. Collard, Ph.D. Department of Computer Science Kent State University.
State and Sequence Diagrams Modelling dynamic information So far we have seen: Use Case Diagrams – requirements capture, interface.
CS 325: Software Engineering February 26, 2015 Object-State Modeling for Event-Driven Systems Event-Driven Systems UML State Machine Diagrams State Pattern.
State Machine Diagram Chapter 10. State Machine Diagram Used to describe system behavior.
Chapter 10 State Machine Diagrams
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
SE-280 Dr. Mark L. Hornick Design Review Issues. SE-280 Dr. Mark L. Hornick 2 Many expensive defects are a result of design problems Software applications.
Detailed design – class design Domain Modeling SE-2030 Dr. Rob Hasker 1 Based on slides written by Dr. Mark L. Hornick Used with permission.
SE 2030 Software Engineering Tools and Practices SE 2030 Dr. Rob Hasker 1 Based on slides written by Dr. Mark L. Hornick Used with permission.
Guide to State Transition Diagram. 2 Contents  What is state transition diagram?  When is state transition diagram used?  What are state transition.
Requirements Analysis via Use Cases SE-2030 Dr. Rob Hasker 1 Based on slides written by Dr. Mark L. Hornick Used with permission.
Object-Oriented Modeling Using UML CS 3331 Section 2.3 of Jia 2003.
UML Review – class diagrams SE 2030 Dr. Rob Hasker 1 Based on slides written by Dr. Mark L. Hornick Used with permission.
1 Modeling interactions and behavior Lecturer Dr. Mai Fadel.
For accurate communication, since a project can have several participants, each from different background. Represent a given aspect of the system We will.
Implementing software in IEC Languages in IEC IEC uses the following languages Instruction List – Assembly level programming using.
ניתוח מערכות מידע 1 Unified Modeling Language (UML) § § The Unified Modeling Language (UML) is the industry-standard language for: Specifying, Visualizing,
Activity diagrams. Introduction ● Activity diagrams are a behavioural model that represent the dynamics of the system. ● An activity diagram is essentially.
The Unified Modeling Language Part II Omar Meqdadi SE 2730 Lecture 9 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Class and Sequence diagrams UML notation SE-2030 Dr. Mark L. Hornick 1.
Chapter 29 State Machine Diagrams 1CS6359 Fall 2011 John Cole.
CS-1020 Dr. Mark L. Hornick 1 Event-Driven Programming.
CSCI-383 Object-Oriented Programming & Design Lecture 12.
Use Case Textual Analysis
States.
CS3773 Software Engineering Lecture 06 UML State Machines.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 26. Review UML behavioral Diagrams – Sequence diagram.
UML Class Diagram notation Indicating relationships between classes SE-2030 Dr. Mark L. Hornick 1.
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.
MCS 270 Spring 2014 Object-Oriented Software Development.
State Machines State diagrams SE-2030 Dr. Mark L. Hornick 1.
Synchronous Counter Design
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.
Activity Diagramming by Andrzej Rosolski Stanisław Gliniewicz.
Model-View-Controller A Design Pattern SE-2030 Dr. Rob Hasker 1 Based on slides written by Dr. Mark L. Hornick Used with permission.
Diagrams. Typically, we view the static parts of a system using one of the four following diagrams. 1. Class diagram 2. Object diagram 3. Component diagram.
High Level Design Use Case Textual Analysis SE-2030 Dr. Mark L. Hornick 1.
The Command Pattern SE-2811 Dr. Mark L. Hornick 1.
UML Review Sequence Diagrams SE-2030 Dr. Rob Hasker 1 Based on slides written by Dr. Mark L. Hornick Used with permission.
TIM 58 Chapter 6, continued: Behavioral Modeling
Finite State Machines Dr K R Bond 2009
7. State Diagram SWE SOFTWARE PROCESS MODELING - AMAN QUADRI.
Activity and State Transition Diagram
State Machine Diagrams
Model-View-Controller
States.
Object Oriented System Design
Advanced State Chart diagrams
State Diagrams.
States.
UML State Diagrams.
ECE 352 Digital System Fundamentals
Modeling Behavior in Statechart Diagrams
State-Transition Diagrams
Chapter 4 Sequence Diagrams
Presentation transcript:

State Machines State diagrams SE-2030 Dr. Rob Hasker 1 Based on slides written by Dr. Mark L. Hornick Used with permission.

Goals Sequence diagram: captures behavior of system Not much detail for individual classes The detail that’s there is spread across multiple diagrams State diagram Capture how object changes in response to events Especially useful for controllers SE-2030 Dr. Rob Hasker 2

SE-280 Dr. Rob Hasker 3 Example State Diagrams illustrate the dynamic behavior of a system (i.e. how a Controller functions) where events (perhaps from the UI) trigger actions and cause the system (Controller) to change its state.

A State Diagram for a light bulb controlled with a toggle switch SE-2030 Dr. Rob Hasker 4 The event flip switch to ‘1’ triggers the action current flows and the transition to the on state. The event flip switch to ‘0’ triggers the action current stops flowing and the transition to the off state.

A State Diagram for a light bulb controlled with a pushbutton switch SE-2030 Dr. Rob Hasker 5 The same event (button pressed) triggers different actions depending upon its current state.

Different events may also cause transitions to the same state SE-2030 Dr. Rob Hasker 6 Different events may cause transitions to different states However, state transitions must be deterministic; that is, the same event cannot cause a transition from one given state to more than one subsequent state.

The same event can cause different states to transition to the same state SE-2030 Dr. Rob Hasker 7 These state transitions are still deterministic since the same event does not cause a transition from one given state to more than one subsequent state.

In a complex system, different events may cause transitions to different states or to the same state SE-2030 Dr. Rob Hasker 8

It is common for an event to result in an action, but no state transition SE-2030 Dr. Rob Hasker 9

Initial and Final states may be indicated as follows SE-2030 Dr. Rob Hasker 10 Initial and Final states are special in that once a system leaves an Initial state, it cannot return to that state, and once a system achieves a Final state, it stays in that state.

Winter 2005/2006SE-280 Dr. Rob Hasker 11 A guard may be used to illustrate a condition that must be satisfied before a state transition can occur. The guard appears in brackets: [ ]

Demo: Describe the logic in a pushbutton lamp controller via a state diagram, and implement the controller as a State Machine SE-2030 Dr. Rob Hasker 12

State Diagrams can be used to help specify the dynamic logic implemented in Controller objects in response to events that the Controller receives SE-2030 Dr. Rob Hasker 13

Review State machines Capture state of instance of a class States, Transitions Events, Actions Deterministic/nondeterministic Initial, final states Guard Implementation SE-2030 Dr. Rob Hasker 14