State Transition Diagrams

Slides:



Advertisements
Similar presentations
Concepts & Notations. Acknowledgements  The material in this tutorial is based in part on: Concurrency: State Models & Java Programming, by Jeff Magee.
Advertisements

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.
State Diagrams A state diagram is a graph whose nodes are states and whose directed arcs are transitions between states. A state diagram specifies the.
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.
7M701 1 Activity Diagram. 7M701 2 Example 7M701 3 Activity Diagram: what is it? Describes activities and flows of data or decisions between activities.
Embedded Systems Details. Object Model: Four main system objects or classes Controller object might be made up of several controllers is the brains of.
Use Case modelling 3 How to go from a diagram to a further definition.
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.
Use Case modelling How to go from a diagram to a further definition.
Essentials of state and activity diagram Lecture 24.
Activity Diagrams. What is Activity Diagrams?  Activity diagrams are a technique to describe procedural logic, business process, and work flow.  An.
THE OBJECT-ORIENTED DESIGN WORKFLOW Statechart Diagrams.
Advanced Behavioral Modeling
SE-565 Software System Requirements More UML Diagrams.
Unified Modeling Language(UML) BY
State and Sequence Diagrams Modelling dynamic information So far we have seen: Use Case Diagrams – requirements capture, interface.
ELEC 1041 Digital Electronics Tutorial: Word Problems
Dynamic Black-Box Testing Part 2
Chapter 10 State Machine Diagrams
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
1 Performance Evaluation of Computer Networks: Part II Objectives r Simulation Modeling r Classification of Simulation Modeling r Discrete-Event Simulation.
1 Object-Oriented Modeling Using UML (2) CS 3331 Fall 2009.
Fall 2010 CS4310 Requirements Engineering UML: Dynamic Modeling Dr. Guoqiang Hu Department of Computer Science UTEP 1.
State Modeling.
1 Software Engineering Dr. K. T. Tsang Lecture 8 State modeling
CS3320::CH111 OBJECT-ORIENTED ANALYSIS Chapter 11.
Object-Oriented Modeling Using UML CS 3331 Section 2.3 of Jia 2003.
1 Modeling interactions and behavior Lecturer Dr. Mai Fadel.
1 State Modeling  Events  States  Transitions and Conditions  State Diagrams  State Diagram Behavior  Practical Tips.
1 A Student Guide to Object- Oriented Development Chapter 7 State Diagrams.
Course Instructor: Kashif Ihsan 1. Chapter # 3 2.
UML Discussion on State Machines Perfectly static system is intensely uninteresting Because nothing ever happens.
CSCI-383 Object-Oriented Programming & Design Lecture 12.
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.
STATE MODELING | Website for Students | VTU - Notes - Question Papers | RESULTS | NEWS.
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.
State Modeling. Events An event is an occurrence at a point in time, such as user depresses left button or.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 UML State Diagrams.
Dynamic Models Sequence Diagrams Collaboration Diagrams Activity Diagrams.
States.
CS3773 Software Engineering Lecture 06 UML State Machines.
Dynamic Modeling Grady Booch, James Rumbaugh, and Ivar Jacobson, The Unified Modeling Language User Guide, 2 nd edition, Addison Wesley, 2005.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 26. Review UML behavioral Diagrams – Sequence diagram.
 Engineering Quality Software.  Today o State Diagrams Jerry Kotuba SYST30009-Engineering Quality Software 2.
MCS 270 Spring 2014 Object-Oriented Software Development.
Dynamic Models - Page L M.E. Fayad Lesson 30: Dynamic Models Object- Oriented Modeling & Application s.
Computer Organization CS345 David Monismith Based upon notes by Dr. Bill Siever and notes from the Patterson and Hennessy Text.
Module 2 OOMD.
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.
Computer Control and Monitoring Today we will look at: What we mean by computer control Examples of computer control Sensors – analogue and digital Sampling.
State transition modeling
Some Simple Design Modeling Techniques
State Machine Model.
State Machine Diagrams
Marlon Dumas Institute of Computer Science
Teaching Innovation - Entrepreneurial - Global
Object Oriented Modeling and Design
Software Architecture and Larger System Design Issues
CS251 – Software Engineering Lectures 11 State Diagrams
Sequential Circuits: Latches
States.
Chapter 5 state Modeling
Sequential Circuits: Latches
Marlon Dumas Institute of Computer Science
States.
Presentation transcript:

State Transition Diagrams Dynamic Modelling

An object’s state and behaviour can be affected by: Changes to attribute values Results of operations Changes of links with other objects Internal events External events

Three models Object model: dynamic model; functional model; Static structure of objects in a system and their relationships. Contains class diagrams. dynamic model; describes aspects that change over time: state transition diagrams functional model; Use Case diagrams

Dynamic modelling Events states state diagrams conditions operations

Events Something that happens at a point in time Mouse button clicked / Signal changes Logically ordered events - causally related Concurrent events - causally unrelated do not effect each other there is no order between them 1-way transmission of information from one object to another

Event classes Event occurrences are grouped into event classes Flight 123 departs from Chicago / Flight 456 departs from Rome Event class is Flight Departs Attributes of event classes Departure origin of flight Flight number Data values are Attributes

Event Classes and Attributes Aeroplane flight departs (airline, flight no, city) Mouse button pushed (button, location) Input string entered (text) phone receiver lifted digit dialled (digit) engine speed enters danger zone

States A state is an abstraction of the attribute values and links of an object. Sets of values are grouped together into a state according to properties that affect the gross behaviour of the object. E.G.. A bank is solvent or insolvent depending on whether it’s assets exceed it’s liabilities. A state corresponds to the interval between 2 events received by an object. A state separates 2 events. An event separates 2 states.

Characterisations of a state State: Alarm ringing Description: alarm on watch is ringing to indicate target time Event sequence that produces the state: set alarm (target time) any sequence not including clear alarm current time = target time

Condition that characterises the state: alarm = on, and target time <= current time <= target time + 20s button has not been pushed since the target time

Events accepted in the state: event action next state current time = target time + 20s reset alarm normal button pushed (any button) reset alarm normal

State Diagrams Relates to a specific object Relate states and events A change of state is called a transition All transitions leaving a state must correspond to different events The transition fires An event that has no transition is ignored A sequence of events corresponds to a path through the graph

State Transition Diagram

Initial/final States The previous example is a continuous loop Most situations will have an initial and final state Chess game checkmate White's turn stalemate Start white wins White Black moves moves Draw Black's turn stalemate Checkmate Black wins

Conditions Used as guards on transitions. A guarded transition only fires when the condition is true e.g. When you go out in the morning (event), If the temperature is below freezing (condition). Put on your gloves (next state).

State Transition Diagram With Conditions Traffic light time-out[cars in N/S right lanes] North/south may go straight North/south may turn right time-out time-out[no cars Time-out in N/S right lanes] time-out[no cars in E/W right lanes] East/west may turn right East/west may go straight Time out[cars in E/W right lanes]

Operations Attached to state Performed in response to the state Attached to a transition Performed in response to the event

Activities and Actions An activity is an operation that takes time. E.G.. Display a picture on a screen. “Do:a ” indicates that activity A occurs throughout the lifetime of the state to which it is attached. An action is an instantaneous operation. E.G.. Disconnect phone line. An action is shown on a transition as “action / event.”

Nesting Diagrams Done by generalising states E.G. Aircraft in flight Done by generalising events E.G. Booking clerk books flight

Exercise 1 - Claims A third party claim arises from an incident that has occurred. The claim must be reported to the claims office within the statutory period to be valid. When the claim is reported, the incident is preferably verified by a member of staff who was present at the time. The claim is recorded and evaluated. If it is a trivial claim, the claims assessor checks the claimant for previous claims and, if there are no or 1 previous claims then a payment is made and the claim is settled. If there are previous claims, the claimant will be referred to the courts. More serious claims may await expert evidence and several different court hearings. At any stage, the claim may be dropped, or a payment made without admitting liability. If the claimant is a minor, the claim must remain on the books until the claimant is over 21. If a claim is settled by a court, it may be appealed. During this time, the claim remains open. Draw a state diagram for a claim.

States of Order

States of Garment (Garments system)