Chapter 5 state Modeling

Slides:



Advertisements
Similar presentations
NCKU EE RTES LAB.1 Unified Modeling Language - Events and State Machines.
Advertisements

1 CIS224 Software Projects: Software Engineering and Research Methods Lecture 6 State Machine and Activity Diagrams (Based on Stevens and Pooley (2006,
State Charts Mehran Najafi. Reactive Systems A reactive, event-driven, object is one whose behavior is best characterized by its response to events dispatched.
Nested state diagrams:Problems with flat state diagram
Concepts & Notations. Acknowledgements  The material in this tutorial is based in part on: Concurrency: State Models & Java Programming, by Jeff Magee.
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.
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.
SE 555 Software Requirements & Specification 1 Activity Diagrams.
Essentials of state and activity diagram Lecture 24.
State Machine Diagrams (State Chart in UML 1) Specifying Control (ref: Chapter 11 Bennett, Mc Robb and Farmer)
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.
SE-565 Software System Requirements More UML Diagrams.
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.
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 Object-Oriented Modeling Using UML (2) CS 3331 Fall 2009.
Business Informatics Group Institute of Software Technology and Interactive Systems Vienna University of Technology Favoritenstraße 9-11/188-3, 1040 Vienna,
NJIT Modeling Behavior in State Chart Diagrams Chapter 29 Rafael Mello.
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
Guide to State Transition Diagram. 2 Contents  What is state transition diagram?  When is state transition diagram used?  What are state transition.
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.
Information System Design IT60105
Software Engineering Design & Modeling Statechart Diagram.
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.
Object Oriented Analysis & Design & UML (Unified Modeling Language)1 Part VI: Design Continuous Activity Diagams State Diagrams.
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.
States.
CS3773 Software Engineering Lecture 06 UML State Machines.
Interaction Diagram An interaction diagram is a graphical representation of interactions between objects. Sequence diagram: shows the sequence in which.
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.
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.
The Dynamic Analysis Model StateCharts Prof. Hany H. Ammar, CSEE, WVU, and Dept. of Computer Science, Faculty of Computers and Information, Cairo University.
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.
1 Object Oriented Analysis System modeling = Functional modeling + Object modeling + Dynamic modeling Functional modeling = Use cases Object modeling =class.
State Machine Model.
State Machine Diagram.
State Machine Diagrams
Marlon Dumas Institute of Computer Science
State Machine Diagrams
UML State Diagrams.
CS251 – Software Engineering Lectures 11 State Diagrams
Finite State Machines and Statecharts
CSC 422 Kutztown University Dr. Spiegel
UML Sequence Diagrams.
UML State machine diagram
States.
Object Oriented System Design
Chapter 10 Object States and The Statechart Diagram
Finite State Machines and Statecharts
Marlon Dumas Institute of Computer Science
States.
UML State Diagrams.
Behavioral Diagrams P. P. Mahale
UML State Diagrams (Ch. 29)
Presentation transcript:

Chapter 5 state Modeling

5. State Modeling State Model consists of multiple state diagrams – one for each class with important temporal behavior State diagrams relate events and states Events States Transitions and Conditions State Diagram State Diagram Behavior

5.1 events An occurrence at a point in time Happens instantaneously with regard to the time scale of an application Two events that are causally unrelated are said to be concurrent – no effect on each other Events include error conditions & normal occurrences Examples : Transaction Aborted ; Time Out Three Kinds of Events Signal Event Change Event Time Event

5.1 Three Kinds of events 5.1.1 Signal Event Signal : An explicit message - one way transmission of info from one object to another Example Traffic Light Signal event : It’s an occurrence in time UML Notation of Signal in a class Keyword “Signal” in guilemets << >> 5.1.2 Change Event A event that is caused by the satisfaction of a boolean expression UML Notation Keyword “when” followed by paranthesized boolean expression When (battery power < lowerlimit) 5.1.3 Time Event An event that is caused by the occurrence of an absolute time or the elapse of a time interval Keyword “when” - in parathesis expression involving time Eg: when (date = September 5 2015) Keyword “after” - in paranthesis expression that evaluates to a time duration Eg: after (10 seconds)

5.2 States An abstraction of the values & links of an object Often a verb with a suffix of “ing” Phone states - Waiting; Dialing UML Notation A rounded box containing a optional state name Convention: State name in bold, center & near the top of the box with Capitalize Various Characterization of States - Refer Book

5.3 Transitions & Guard conditions Transition: Instantaneous change from one state to another Guard Conditions(GC): Boolean expression that must be true in order for a transition to occur UML Notation: Transition: A line from the origin state to the target state. An arrow head points to the target. Guard Condition: Optionally listed in square brackets A GC triggers only once is different from Change Event which needs to be satisfies all time.

5.4 state diagram A graph whose nodes are states & whose arcs are transition between states State names must be unique within the scope of a state diagram UML Notation A state diagram is a rectangle with its name in a small pentagonal tag in the upper left corner 5.4.1 Sample State Diagram 5.4.2 One shot State Diagram Represents Object with finite lives and have initial & final states

5.5 StATE DIAGRAM BEHAVIOR 5.5.1 Activity Effects Activity: Actual behavior that can be worked by any number of effect Effect: A reference to a behavior that is executed in response to an event An activity may be performed upon a transition or event within a state UML Notation “/” & the name of the activity following the event that causes it “do” keyword for ongoing activity

5.5.2 do activities A do activity is an activity that continues for an extended time A do activity can only occur within a state & cannot be attached to a transition

5.5.3 Entry & exit activities Activities can be bound to entry or to exit from a state or on transition If a state has multiple activities they are performed in order Activities on incoming transition Entry activities Do activities Exit activities Activities on the outgoing transition Any event can occur within a state & cause an activity to be performed Self transition: Causes entry & exit activities to be executed

5.5.4 Completion transition An arrow without an event name indicates an automatic transition that fires when the activity associated with the source state is completed Such unlabelled transition are called completion transition as they are triggered by completion of activity in the source state

5.5.5 Sending signals From one object if a signal is sent to another object If an object can receive signals from more than one object the order in which concurrent signals are received may affect the final state. This is called race condition