State Machine Diagram Chapter 10. State Machine Diagram Used to describe system behavior.

Slides:



Advertisements
Similar presentations
State Diagram 1. State diagram: Shows the behavior of one object. They describe all of the possible states that a particular object can get into and how.
Advertisements

Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
UML State chart/machine diagram State machine diagram is a behavior diagram which shows discrete behavior of a part of designed system through finite state.
Activity Diagrams in UML. Definition Activity diagrams represent the dynamics of the system. They are flow charts that are used to show the workflow of.
ESE Einführung in Software Engineering 7. Modeling Behaviour Prof. O. Nierstrasz.
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
5/24/2015CPSC , CPSC , Lecture 71 Software Engineering, CPSC , CPSC , Lecture 7.
UML Activity Diagrams In UML an activity diagram is used to display the sequence of actions They show the workflow from start to finish Detail the many.
Software engineering Methods Software Engineering Methods State Diagrams Zvi Avidor Written By With additions by Zvika Gutterman and Adam Carmi.
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.
Queueing Models: Data Collection and Hand Simulation from Prof. Goldsman’s lecture notes.
Advanced Behavioral Modeling
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.
SE-565 Software System Requirements More UML Diagrams.
An Introduction to Rational Rose Real-Time
WORKING WITH MACROS CHAPTER 10 WORKING WITH MACROS.
State Machines State diagrams SE-2030 Dr. Rob Hasker 1 Based on slides written by Dr. Mark L. Hornick Used with permission.
Lecture 4 Finite State Machine CS6133 Software Specification and Verification.
Chapter 10 State Machine Diagrams
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
HOW TO SEARCH RECORDS in WINISIS an online training WinIsis offers two options for searching and retrieving records: Guided Search ( provides a simplified.
מידול התנהגותי 1. Today’s Session Sequence Diagrams State Machines 2.
Business Informatics Group Institute of Software Technology and Interactive Systems Vienna University of Technology Favoritenstraße 9-11/188-3, 1040 Vienna,
Systems Analysis and Design in a Changing World, Fifth Edition
Systems Analysis and Design in a Changing World, 6th Edition
Guide to State Transition Diagram. 2 Contents  What is state transition diagram?  When is state transition diagram used?  What are state transition.
Behavioral diagrams Lecture p4 T120B pavasario sem.
Object-Oriented Modeling Using UML CS 3331 Section 2.3 of Jia 2003.
1 Modeling interactions and behavior Lecturer Dr. Mai Fadel.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
Information Systems Engineering Interaction Diagrams: Sequence Diagram Collbortion Diagram.
Information System Design IT60105
Digital Electronics and Computer Interfacing Tim Mewes 4. LabVIEW - Advanced.
1 Kyung Hee University Statecharts Spring Kyung Hee University Specifying Objects’ Behaviour  Interaction diagrams show message-passing behaviour.
Chapter 11 Activity Diagrams. 2 “Activity diagrams are a technique to describe procedural logic, business processes, and work flows” - M. Fowler An activity.
State Modeling. Introduction A state model describes the sequences of operations that occur in response to external stimuli. As opposed to what the operations.
Object Oriented Analysis & Design & UML (Unified Modeling Language)1 Part VI: Design Continuous Activity Diagams State Diagrams.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 UML State Diagrams.
Systems Analysis and Design in a Changing World, Fourth Edition
States.
CS3773 Software Engineering Lecture 06 UML State Machines.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 26. Review UML behavioral Diagrams – Sequence diagram.
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.
State Machines State diagrams SE-2030 Dr. Mark L. Hornick 1.
State Machine Diagram Chapter 5 Introduction Pages
2/25/2016COSC , Lecture 191 Real-Time Systems, COSC , Lecture 19 Stefan Andrei.
 2002 Prentice Hall. All rights reserved. 1 Chapter 5 – Control Structures: Part 2 Outline 5.1Introduction 5.2 Essentials of Counter-Controlled Repetition.
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.
UML ACTIVITY DIAGRAM 1. Recap Formal Use Case diagram UML notation for use cases Examples 2.
Process Control Management Prepared by: Dhason Operating Systems.
State Modeling. Introduction A state model describes the sequences of operations that occur in response to external stimuli. As opposed to what the operations.
® IBM Software Group © 2009 IBM Corporation Module 11: Creating State Machine Diagrams Essentials of Modeling with IBM Rational Software Architect V7.5.
JavaScript, Sixth Edition
State Machine Diagram.
Marlon Dumas Institute of Computer Science
Activity Diagram.
Activity and State Transition Diagram
State Machine Diagrams
Software Engineering Chapter 5 (Part 3) System Modeling Dr.Doaa Sami.
Designing and Debugging Batch and Interactive COBOL Programs
CSC 422 Kutztown University Dr. Spiegel
States.
Advanced State Chart diagrams
Week 12: Activity & Sequence Diagrams
BIC 10503: COMPUTER ARCHITECTURE
Marlon Dumas Institute of Computer Science
States.
MACROS MUST BE ENABLED FOR THIS FILE TO WORK
Business Process Modeling Notation (BPMN)
Presentation transcript:

State Machine Diagram Chapter 10

State Machine Diagram Used to describe system behavior

State Machines Simple set of notational elements state-name Initial state (pseudo-state) State Final state trigger[guard]/activity Super state transition

Start/Final states Start state indicates where the state machine starts Final state indicates that the machine should terminate

States Intermediate state of the system –entry/activity: perform the activity when the state is entered –exit/activity: perform the activity when the state is exited –trigger/internal activity: perform the internal activity whenever trigger occurs state-name entry/activity exit/activity trigger/internal activity …

Activity state Think of this as a state with a separate running thread that can be interrupted at any time –As opposed to being in a “regular” state just waiting for a trigger to arrive –Note that a trigger[guard]/activity (next slide) cannot be interrupted state-name do/activity

Super state Just a way of grouping states to remove clutter from a diagram –When two or more states have the same transition[guard]/activity (next slide) to the same next state you can group them together and not have to show each and every individual transition x[y]/z

Concurrent states When you have multiple state machines running concurrently (threads or multi-processing) –The history pseudo state (H) indicates the default state when entire machine is started H

Transition Cause the current state of the machine to change from state to another –trigger: event that occurs causing the change –[guard]: condition that must be true for the change to occur –activity: action performed as a result of the transition trigger[guard]/activity

Transition All three parts are optional –If there is no specified trigger, the state performs any enter/exit/internal activities then leaves immediately Transitions out of a single state must be unique with respect to trigger[guard] specifications –Unless you want a stochastic system (randomly choose the transition when the trigger[guard] occurs) Can use logical connectors (and, or, not)

Summary Processing begins at initial state Proceeds to intermediate states –Event triggered transition Leave one state, enter the next –Unconditional transition Processing in the state finishes (e.g. start state) –Concludes when the (a) final state is reached May be more than 1 final states

Example Enter PasswordAuthenticate User characters typed typed valid user invalid user Login

State Machines (cont.) Like everything else, state machines will be developed through a series of refinements The process ends when all states are “self-explanatory” The process results in a hierarchy of state machines Root node of the hierarchy is the system itself

State Machines (cont.) Note that these are NOT flow charts!!! –Flow charts provide a one-to-one correspondence with code –State machines provide a one-to-one correspondence with architectural elements

Specification Changes

Scoring Manual mode only Score counter starts at 0 Increments by 1 each time the ball hits the paddle Stops incrementing when the ball moves below the paddle (game ends) Should be displayed at all times

Difficulty levels Manual mode only When the number of paddle hits (score) is a multiple of 10 but not a multiple of 20, increase the speed of the ball by 5% When the number of paddle hits (score) is a multiple of 20, decrease the size of the paddle by 5%

Score database When a game ends (see scoring on previous slide) have the user enter their name and save the name/score in a “database” Add a button to show the top 10 scores and the player names Add a button to show all scores for a particular player (read the player name from the user)

Deliverables Sequence diagram(s) User interface design (mock-up) State machine diagram for the user interface Revised specification Due two weeks from tonight –Be prepared to discuss next week