NJIT Modeling Behavior in State Chart Diagrams Chapter 29 Rafael Mello.

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

UML State Machine Diagrams and Modeling
State Charts Mehran Najafi. Reactive Systems A reactive, event-driven, object is one whose behavior is best characterized by its response to events dispatched.
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.
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
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.
SWE Introduction to Software Engineering
Introduction to UML Part 2 Behavioral Modeling. Sequence (event) diagram Describes object interaction Typically captures behavior of a single use case.
CS 425/625 Software Engineering System Models
State Machine Diagrams (State Chart in UML 1) Specifying Control (ref: Chapter 11 Bennett, Mc Robb and Farmer)
1 CS/CPE 426 Senior Projects Chapter 21: State Machines Chapter 22:Advanced State Machines [Arlow and Neustadt 2005] March 24, 2009.
THE OBJECT-ORIENTED DESIGN WORKFLOW Statechart Diagrams.
Use Case Modeling.
Advanced Behavioral Modeling
6. 2Object-Oriented Analysis and Design with the Unified Process Objectives  Explain how events can be used to identify use cases that define requirements.
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.
Structured Vs. Object Oriented Analysis and Design SAD Vs. OOAD
State and Sequence Diagrams Modelling dynamic information So far we have seen: Use Case Diagrams – requirements capture, interface.
Chapter 5 – System Modeling
Lecture 4 Finite State Machine CS6133 Software Specification and Verification.
Chapter 10 State Machine Diagrams
Class, Sequence and UML Model.  Has actors and use cases.
1 Object-Oriented Modeling Using UML (2) CS 3331 Fall 2009.
Software Engineering 1 Object-oriented Analysis and Design Chap 29 UML State Machine Diagrams and Modeling.
Sommerville 2004,Mejia-Alvarez 2009Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
Session 22 Modeling the Extended Features of the Statechart Written by Thomas A. Pender Published by Wiley Publishing, Inc. October 27, 2011 Presented.
1 A Student Guide to Object- Oriented Development Chapter 7 State Diagrams.
Systems Analysis and Design in a Changing World, 6th Edition
Systems Analysis and Design in a Changing World, 6th Edition 1 Chapter 3 Use Cases.
OO Methodology Elaboration Iteration 3 – Part 2 Refining Models.
Drawing System Sequence Diagrams
Information System Design IT60105
Software Engineering Design & Modeling Statechart Diagram.
1 Kyung Hee University Statecharts Spring Kyung Hee University Specifying Objects’ Behaviour  Interaction diagrams show message-passing behaviour.
Chapter 29 State Machine Diagrams 1CS6359 Fall 2011 John Cole.
UML Discussion on State Machines Perfectly static system is intensely uninteresting Because nothing ever happens.
State Modeling. Events An event is an occurrence at a point in time, such as user depresses left button or.
States.
CS3773 Software Engineering Lecture 06 UML State Machines.
State Chart diagram Week objective Describe State chart Diagrams in Dynamic Modelling 2.
 Engineering Quality Software.  Today o State Diagrams Jerry Kotuba SYST30009-Engineering Quality Software 2.
INFO 620Lecture #71 Information Systems Analysis and Design Design Class Diagrams and others INFO 620 Glenn Booker.
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.
State Machine Diagram Chapter 5 Introduction Pages
2/25/2016COSC , Lecture 191 Real-Time Systems, COSC , Lecture 19 Stefan Andrei.
State Modeling. Introduction A state model describes the sequences of operations that occur in response to external stimuli. As opposed to what the operations.
Chapter 5 – System Modeling Lecture 1 1Chapter 5 System modeling.
1 Object Oriented Analysis System modeling = Functional modeling + Object modeling + Dynamic modeling Functional modeling = Use cases Object modeling =class.
CompSci 280 S Introduction to Software Development
Systems Analysis and Design in a Changing World, Fourth Edition
Chapter 5 System modeling
State Machine Diagram.
State Machine Diagrams
CS251 – Software Engineering Lectures 11 State Diagrams
UML Activity Diagrams & State Charts
States.
Object Oriented System Design
CS/CPE 426 Senior Projects
Chapter 5 state Modeling
CS/CPE 426 Senior Projects
States.
State Machine Diagrams
Software design and architecture
CS 791Z State Machines & Advanced State Machines
CIS 375 Bruce R. Maxim UM-Dearborn
Appendix 3 Object-Oriented Analysis and Design
Modeling Behavior in Statechart Diagrams
UML State Diagrams (Ch. 29)
Presentation transcript:

NJIT Modeling Behavior in State Chart Diagrams Chapter 29 Rafael Mello

Introduction A State Diagram is drawn to show the life history of a reactive object. A reactive, event-driven, object is one whose behavior is best characterize by its response to events dispatched from outside its context. Objects are usually in a state, ex: Idle, until an event is trigger and makes the object transition from state to state. When that happens, its response usually depends on prior events.

Events and States Event – Is an occurrence that triggered the state. A telephone receiver is taken off the hook. State – Is the condition of a object at a specific time. A telephone is on “idle” state until it is taken from the hook.

Transitions Transition – Involves going from one state to the other when an event occurs. Transitions are label in form: Event [Guard] / Action When the event “off hook” occurs, transition the telephone from the “idle” state to the “active” state.

Statechart Diagrams initial State state transition event A Statechart diagram shows the lifecycle of an object

Statechart Diagrams (Cont.) The state diagram on the previous slide illustrates a simple telephone state chart diagram, with states, events and transitions. The states are shown in round rectangles. The transitions are shown with arrows, and the events are the labels in each transition.

Use Case Statechart Diagrams The Use Case Statechart diagram is used to describe the sequence of external events that is handled by a system described in a use case scope. Ex: In a Process Sale use case it is not permitted to perform a makeCreditPayment until the endSale event has happened.

Classes that benefit from Statechart Diagram In addition to Use Case and system design, the Statechart diagram can be used to describe object state behavior. Object can be state-independent or state- dependant. State-independent objects are objects that always respond the same way to an event. State-dependent objects are object that reacts different to events.

When to use Statechart Diagrams The next slide contains a list of common state- dependant objects that might be worth illustrating in a Statechart diagram:

Classes that benefit from Statechart Diagram Use Case – View as a class Stateful sessions – Server-side software objects Systems – classes representing the system Windows – window’s action “Edit-Copy” Controllers – GRASP controller objects Transactions – The way transaction respond to events Devices – Microwave oven, Radio Role Mutators – Classes that change its roles.

Illustrating External and Interval Events There are three types of events: External Event – Events caused by an outside actor, outside of the system’s boundary. Internal Event – Events caused by an internal action, inside the system’s boundary. Temporal Event – Events caused by a determined date or time clock.

Additional Statechart Diagram Notation Additional features UML notation for statechart diagram: Transition actions Transition guard condition Nested states

Additional Statechart Diagram Notation (Cont.) Transitions are what makes an action to fire, such as a method invocation. A transition also can have a Boolean test, such as a guard, that only happens if the test succeeds. Nested states represents substates. The substate inherits the transitions of its superstate.

Additional Statechart Diagram Notation (Cont.) Example of Transition action and guard notation

Additional Statechart Diagram Notation (Cont.) Example of nested states