Fall 2010 CS4310 Requirements Engineering UML: Dynamic Modeling Dr. Guoqiang Hu Department of Computer Science UTEP 1.

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

Behavioral Modeling: State Diagrams CIS 4800 Kannan Mohan Department of CIS Zicklin School of Business, Baruch College Copyright © 2009 John Wiley & Sons,
Assignments.
Dynamic Modeling. Dynamic Modeling with UML Interaction diagram –Dynamic behavior of a set of objects arranged in time sequence –Interaction between objects.
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.
State Transition Diagrams
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.
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.
K. Stirewalt CSE 335: Software Design Administrivia Homework #7 on web –A “tour” rather than a working project –Please look through it and try to understand.
1 CS 691z/791z Topics in Software Engineering Chapter 13: Activity Diagrams & Chapter 19: Basic Statecharts [Arlow and Neustadt, 2002] March 8, 2007.
THE OBJECT-ORIENTED DESIGN WORKFLOW Statechart Diagrams.
7M822 UML Interaction Diagrams 25 November 2010.
University of Toronto Department of Computer Science © Steve Easterbrook. This presentation is available free for non-commercial use with attribution.
Unified Modeling Language(UML) BY
State and Sequence Diagrams Modelling dynamic information So far we have seen: Use Case Diagrams – requirements capture, interface.
CS451 Introduction to Software Engineering Behavioral Modeling.
CS 325: Software Engineering February 26, 2015 Object-State Modeling for Event-Driven Systems Event-Driven Systems UML State Machine Diagrams State Pattern.
Lecture 4 Finite State Machine CS6133 Software Specification and Verification.
Chapter 10 State Machine Diagrams
Real-Time Systems time dependent control oriented driven by events rather than data.
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.
Software Engineering 1 Object-oriented Analysis and Design Chap 29 UML State Machine Diagrams and Modeling.
E. Kraemer CSE 335: Software Design Software Architecture and Larger System Design Issues Lecture 5: Finite state modeling and analysis Topics: –Using.
State Modeling.
1 Software Engineering Dr. K. T. Tsang Lecture 8 State modeling
Benjamin Gamble. What is Time?  Can mean many different things to a computer Dynamic Equation Variable System State 2.
CS3320::CH111 OBJECT-ORIENTED ANALYSIS Chapter 11.
CSE 251 Dr. Charles B. Owen Programming in C1 States and State Machines.
Behavioral diagrams Lecture p4 T120B pavasario sem.
Object-Oriented Modeling Using UML CS 3331 Section 2.3 of Jia 2003.
1 State Modeling  Events  States  Transitions and Conditions  State Diagrams  State Diagram Behavior  Practical Tips.
Fall 2010 CS4310 Requirements Engineering A Brief Review of UML & OO Dr. Guoqiang Hu Department of Computer Science UTEP 1.
SWT - Diagrammatics Lecture 4/4 - Diagramming in OO Software Development - partB 4-May-2000.
Chapter 29 State Machine Diagrams 1CS6359 Fall 2011 John Cole.
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.
Dynamic Models Sequence Diagrams Collaboration Diagrams Activity Diagrams.
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.
MCS 270 Spring 2014 Object-Oriented Software Development.
Modeling Object Lifecycles and State-Dependent Behavior ©SoftMoore ConsultingSlide 1.
State Machine Diagram Chapter 5 Introduction Pages
Computer Organization CS345 David Monismith Based upon notes by Dr. Bill Siever and notes from the Patterson and Hennessy Text.
Module 2 OOMD.
Using your ENA Connect Phone Polycom IP 321/331/335.
All Freezer Advance. When the Freezer is first supplied with power or if a power outage occurs, the display will indicate this by flashing the temperature.
York University Department of Computer Science © Castro, Mylopoulos and Easterbrook Lecture 11: Modelling “State”  What is State?  statespace.
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 Diagram – Advanced Concepts
Marlon Dumas Institute of Computer Science
7. State Diagram SWE SOFTWARE PROCESS MODELING - AMAN QUADRI.
Object Oriented Modeling and Design
Software Architecture and Larger System Design Issues
UML State Diagrams.
CS251 – Software Engineering Lectures 11 State Diagrams
Lesson 16: State-Based Sequential Design
Object Oriented System Design
Chapter 5 state Modeling
Marlon Dumas Institute of Computer Science
UML State Diagrams.
Modeling Behavior in Statechart Diagrams
UML State Diagrams (Ch. 29)
Presentation transcript:

Fall 2010 CS4310 Requirements Engineering UML: Dynamic Modeling Dr. Guoqiang Hu Department of Computer Science UTEP 1

Outline: 1.Key Concepts & Their UML Notations 2.Basic State Diagram UML Notations 3.Examples 4.Exercises 5.Nested State Diagram, Nested State 6.Sequence Diagram 7.Activity Diagram 2

3 1 Key Concepts & Their UML Notations 1.1 State model Describes the sequences of operations of objects that occur in response to stimuli Consists of multiple state diagrams, one for each class with temporal behavior that is important to an application 1.2 State An abstraction of the values and links of an object: sets of values and links grouped together into a state according to the gross behavior of the object Ignore attributes that do not affect the behavior of the object, and lump together in a single state all combinations of values and links with the same response to events Solvent Insolvent Powered Waiting Dialing

4 1.3 Event An occurrence at a point in time Can be causally related or unrelated (concurrent) The most common types of event: 1.Signal event: Sending or receiving a signal (message) 2.Change event: Caused by the satisfaction of a boolean expression (continuously tested)  when (room temperature < heating set point)  when (room temperature < cooling set point) 3.Time event: Caused by the occurrence of an absolute time or the elapse of a time interval  when (date = October 28, 2010)  after (10 seconds)

5 1.4 Event vs. state Events: points in time State: intervals in time All events are ignored in a state, except those for which behavior is explicitly prescribed. The response may include the invocation of behavior or a change of state. power turned on power turned off power turned on time Powered Not powered 1.5 Transitions and conditions Transitions: An instantaneous change from one state to another Guard condition: A boolean expression that must be true for a transition to occur (only checked once)

6 event (attribs) [condition] / effect State diagram name 2 Basic State Diagram UML Notation State1 do / activity event / effect State2 … For example: right button down / display pop-up menu Idle Menu visible Activities for pop-up menu right button up / erase pop-up menu cursor moved / highlight menu item

7 For example: Paper jam do / flash warning light Do-activity for copy machine White’s turn Black’s turn black moves Black wins Draw White wins checkmate stalemate For example: Initial & final state white moves Chess

8 depress / motor up DoorOpener 3 Examples (1) Closed Open Opening Closing door open / motor off depress / motor down depress / motor up door closed / motor off

9 timeout SmartTrafficLights 3 Examples (2) North/South May go straight timeout [cars in N/S left lanes] North/South May turn left East/West May go straight East/West May turn left timeout timeout [cars in E/W left lanes] timeout [no cars in E/W left lanes] timeout [no cars in N/S left lanes]

4 In-Class Exercises (1) Draw a state diagram for a digital watch (8 minutes) The watch has a single mode button and a single advance button. Pressing the mode button once and then pressing the advance button increments the hours by 1. Each press of the advance button increments the hour. Pressing the mode button the second time allows advancing the minutes by 1. Pressing the mode button a third time displays the current time. While displaying the current time, the advance button is ignored. Pressing the mode button allows the user to set the hour again. 10

DigitalWatch 4 In-Class Exercises (1) Display Current Time Set Hours Set Minutes Mode button Advance / hours=(hours+1) mod 24 Advance / min=(min+1) mod 60 11

4 In-Class Exercises (2) Draw a state diagram for an office phone when making a call. (15 minutes) Assume that the phone has keys for the digits 0-9, #, and *. It can detect when the receiver is on-hook or off-hook. Hint: The phone is idle when the receiver is on-hook. Based on your past experiences, you can decide the possible states of the phone, for example, dialing, connecting, talking, etc. 12

4 In-Class Exercises (2) 13

5 Nested State Diagram, Nested State 14

5 Nested State Diagram, Nested State (cont’d) 15

5 In-Class Exercises (3) Draw a state diagram for an automatic transmission (10 minutes). The transmission can be in reverse, neutral, or forward. If it is in forward, it can be in first, second, or third gear. States first, second, and third are nested states of forward. Selecting “N” in any forward gear shifts the transmission to neutral. Selecting “F” in neutral always shifts the transmission to first, In any forward gear, stopping the car always shifts the transmission to first. 16

5 In-Class Exercises (3) 17

6 Sequence Diagram 18

6 Sequence Diagram (cont’d) 19

7 Activity Diagram 20

7 Activity Diagram (cont’d) 21