SlideShare a Scribd company logo
UsingUML,Patterns,andJava
Object-OrientedSoftwareEngineering Chapter 5,
State Modeling
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 2
Overview:
 Events
 States
 Transitions and Conditions
 State Diagrams
 State Diagram Behavior
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 3
Events
 An event is an occurrence at a point in time, such as user
depresses left button or flight 123, departs from Chicago.
 Events often correspond to verbs in the past tense (power
turned on, alarm set)
 Events are messages sent to objects.
 An event is an occurrence at a point in time, such as user
depresses left button to know various options. Another example
Rail departs from Mysore to Bangalore.
 Events corresponds to verbs in the past tense or to the onset of
some condition. The time in which an event occurs is an
implicit attribute of the event.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 4
Events
 One event may logically precede or follow another or the two
events may be unrelated.
 For example two flight can arrive at two different airports. Two
events are casually unrelated are said to be concurrent , they
have no effect on each other.
 Events include error conditions and also normal occurrences.
Example timeout events , paper jammed in printer, transaction
aborted etc.,
 There are several kinds of events
• Change event
• Signal event
• Time event
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 5
Signal Event
 A signal is an explicit one-way transmission of information
from one object to another.
 A signal event is the event of sending or receiving a signal.
Here we are more concerned about the receipt of a signal,
because it causes effects in the receiving object.
 A signal is a message between objects while a signal event is
an occurrence in time.
 Every signal transmission is a unique occurrence, but we group
them into signal classes and give each signal class a name to
indicate common structure and behavior.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 6
Signal Event
 Every signal transmission is a unique occurrence, but we group
them into signal classes and give each signal class a name to
indicate common structure and behavior.
 Let us consider an example Kingfisher flight 123 departs from
Mysore on March 23, 2010 is an instance of signal class Flight-
Departure.
 Some signals are simple occurrences, but most signal classes
have attributes indicating the values they convey.
 The UML notation is the keyword signal in guillements(<< >>)
above the signal class in the top section of a box. The second
section lists the signal attributes.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 7
Change Event
 A change event is an event that is caused by the satisfaction of
a Boolean expression.
 Event of the expression is continually tested – whenever the
expression changes from false to true , the event occurs.
 The UML notation for change event is the keyword when
followed by a parenthesized Boolean expression.
Time Event
 A time event is an event caused by the occurrence of an
absolute time or the elapse of a time interval.
 The UML notation for an absolute time is the keyword when
followed by a parenthesized expression involving time. The
notation for a time interval is the keyword after followed by a
parenthesized expression that evaluates to a time duration.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 8
States
 A state is an abstraction of the values and links of an object. Set
of values and links are grouped together into a state according
to the gross behavior of objects.
 UML notation for a state – a rounded box, containing an
optional state name.
 The objects in a class have finite number of possible states.
Each object can only be in one state at a time. Objects pass
through one or more states during their lifetime.
 A state specifies the response of an object to input events. All
events are ignored in a state, except those for which behavior is
explicitly prescribed. For example, if a digit is dialed in state
Dial tone, the phone line drops the dial tone and enters state
Dialing.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 9
Event Vs. States
 Events represent points in time. State represent intervals of
time. A state corresponds to the interval between two events
received by an object.
 Both events and states depend on the level of abstraction. A
travel agent planning an itinerary would treat each segment of a
journey as a single event, an air traffic control system would
break each flight into many geographical legs.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 10
Transitions and conditions
 A transition is an instantaneous change from one state to
another. For example, when a phone is answered , the phone
line transitions from the Ringing state to the Connected state.
The choice of next state depends on both the original state and
the event received.
 A guard condition is a Boolean expression that must be true in
order for a transition to occur.
 A guard condition is checked only once, at the time the event
occurs and the transition fires, if the condition is true.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 11
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 sequences caused by events.
 The state model consists of multiple state diagrams, one state
diagram for each class with important temporal behavior.
Sequences.
 State names must be unique within the scope of a state
diagram.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 12
One shot state diagram
 The state model consists of multiple state diagrams, one state
diagram for each class with important temporal behavior.
 One shot state diagrams represent objects with finite lives and
have initial and final states.
 The initial state is entered on creation of an object, entry of the
final state implies destruction of the object.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 13
Summary of Basic State Diagram Notation
 State: Drawn as rounded box containing an optional name.
 Transition: Drawn as a line from the origin state to the target
state.
 Event: A signal event is shown as a label on a transition and
may be followed by parenthesized attributes.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 14
State diagram behavior
 An effect is a reference to a behavior that is executed in
response to an event.
 An activity is the actual behavior that can be invoked by any
number of effects.
 An activity may be performed upon a transition, upon the entry
to or exit from a state, or upon some other event within a state.
Activities can also represent internal control operations, a
program might increment an internal counter every time a
particular event occurs.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 15
Activity effect
 The notation for an activity is a slash(/) and the name (or
description) of the activity, followed the event that causes it.
The keyword do is reserved for indicating an ongoing activity
and may not be used as an event name.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 16
Do-activities
 A do-activity is an activity that continues for an extended time.
Do-activity can only occur within a state and cannot be
attached to a transition.
 The notation “do /” denotes a do-activity that may be
performed for all or part of the duration that an object is in a
state.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 17
Entry and exit activity
 One can bind activities to entry or to exit from a state.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 18
Guard Conditions
 Selection tools are not, however, non-deterministic.
 The transition that is followed is determined completely by
where the user clicks the mouse.
 We can show this by adding guard conditions to the transitions,
written in brackets after the event name.
 Guard conditions are boolean expressions.
 They are evaluated when a press event is received, and
depending which one is true at the time of the event being
received, the tool will transition to either of the “Moving” or
“Error” states.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 19
Guard Conditions

More Related Content

What's hot

Ooad 3
Ooad 3Ooad 3
Seminar State Chart1
Seminar State Chart1Seminar State Chart1
Seminar State Chart1
Jenish Bhavsar
 
State Diagram
State DiagramState Diagram
4. class diagrams using uml
4. class diagrams using uml4. class diagrams using uml
4. class diagrams using umlAPU
 
Implications of Substitution
Implications of SubstitutionImplications of Substitution
Implications of Substitution
adil raja
 
Object Modeling Techniques
Object Modeling TechniquesObject Modeling Techniques
Object Modeling Techniques
Shilpa Wadhwani
 
State Pattern In Flex
State Pattern In FlexState Pattern In Flex
State Pattern In Flex
tcab22
 
CS8592 Object Oriented Analysis & Design - UNIT III
CS8592 Object Oriented Analysis & Design - UNIT III CS8592 Object Oriented Analysis & Design - UNIT III
CS8592 Object Oriented Analysis & Design - UNIT III
pkaviya
 
6. activity diagrams
6. activity diagrams6. activity diagrams
6. activity diagramsAPU
 

What's hot (10)

Jar chapter 4, part 1
Jar chapter 4, part 1Jar chapter 4, part 1
Jar chapter 4, part 1
 
Ooad 3
Ooad 3Ooad 3
Ooad 3
 
Seminar State Chart1
Seminar State Chart1Seminar State Chart1
Seminar State Chart1
 
State Diagram
State DiagramState Diagram
State Diagram
 
4. class diagrams using uml
4. class diagrams using uml4. class diagrams using uml
4. class diagrams using uml
 
Implications of Substitution
Implications of SubstitutionImplications of Substitution
Implications of Substitution
 
Object Modeling Techniques
Object Modeling TechniquesObject Modeling Techniques
Object Modeling Techniques
 
State Pattern In Flex
State Pattern In FlexState Pattern In Flex
State Pattern In Flex
 
CS8592 Object Oriented Analysis & Design - UNIT III
CS8592 Object Oriented Analysis & Design - UNIT III CS8592 Object Oriented Analysis & Design - UNIT III
CS8592 Object Oriented Analysis & Design - UNIT III
 
6. activity diagrams
6. activity diagrams6. activity diagrams
6. activity diagrams
 

Similar to Ooad ch 5

Lecture 13 requirements modeling - flow & behavior (2)
Lecture 13   requirements modeling - flow &  behavior (2)Lecture 13   requirements modeling - flow &  behavior (2)
Lecture 13 requirements modeling - flow & behavior (2)
IIUI
 
States machine
States machineStates machine
States machine
Satyamevjayte Haxor
 
STATE DIAGRAM.pptx
STATE DIAGRAM.pptxSTATE DIAGRAM.pptx
STATE DIAGRAM.pptx
ssuser2d043c
 
Software engineering.pptx
Software engineering.pptxSoftware engineering.pptx
Software engineering.pptx
NourhanTarek23
 
Software engineering.pptx
Software engineering.pptxSoftware engineering.pptx
Software engineering.pptx
NourhanTarek23
 
ch2lect.ppt
ch2lect.pptch2lect.ppt
ch2lect.ppt
KalsoomTahir2
 
Q6. In a UML state machine diagram, 1. What is an event How is it re.pdf
Q6. In a UML state machine diagram, 1. What is an event How is it re.pdfQ6. In a UML state machine diagram, 1. What is an event How is it re.pdf
Q6. In a UML state machine diagram, 1. What is an event How is it re.pdf
arshadkhan4488
 
SE18_Lec 10_ UML Behaviour and Interaction Diagrams
SE18_Lec 10_ UML Behaviour and Interaction DiagramsSE18_Lec 10_ UML Behaviour and Interaction Diagrams
SE18_Lec 10_ UML Behaviour and Interaction Diagrams
Amr E. Mohamed
 
SE_Lec 09_ UML Behaviour Diagrams
SE_Lec 09_ UML Behaviour DiagramsSE_Lec 09_ UML Behaviour Diagrams
SE_Lec 09_ UML Behaviour Diagrams
Amr E. Mohamed
 
UML Diagrams For Online Course Portal
UML Diagrams For Online Course PortalUML Diagrams For Online Course Portal
UML Diagrams For Online Course Portal
HarieHaren GV
 
Unit two concept of classes and objects
Unit two concept of classes and objects Unit two concept of classes and objects
Unit two concept of classes and objects
Dr Chetan Shelke
 
ch04lect1.ppt
ch04lect1.pptch04lect1.ppt
ch04lect1.ppt
vrushalikadam23
 
M03 2 Behavioral Diagrams
M03 2 Behavioral DiagramsM03 2 Behavioral Diagrams
M03 2 Behavioral DiagramsDang Tuan
 
Objec oriented Analysis and design Pattern
Objec oriented Analysis and design PatternObjec oriented Analysis and design Pattern
Objec oriented Analysis and design Pattern
Ashish Kumar Thakur
 
ch02lect1.ppt
ch02lect1.pptch02lect1.ppt
ch02lect1.ppt
ssuser4cdabf
 
ch02lect1.ppt learning education for all students
ch02lect1.ppt learning education for all studentsch02lect1.ppt learning education for all students
ch02lect1.ppt learning education for all students
talldesalegn
 
A LITERATURE SURVEY OF COGNITIVE COMPLEXITY METRICS FOR STATECHART DIAGRAMS
A LITERATURE SURVEY OF COGNITIVE COMPLEXITY METRICS FOR STATECHART DIAGRAMSA LITERATURE SURVEY OF COGNITIVE COMPLEXITY METRICS FOR STATECHART DIAGRAMS
A LITERATURE SURVEY OF COGNITIVE COMPLEXITY METRICS FOR STATECHART DIAGRAMS
ijseajournal
 
Free ebooks download ! Edhole
Free ebooks download ! EdholeFree ebooks download ! Edhole
Free ebooks download ! Edhole
Edhole.com
 

Similar to Ooad ch 5 (20)

Lecture 13 requirements modeling - flow & behavior (2)
Lecture 13   requirements modeling - flow &  behavior (2)Lecture 13   requirements modeling - flow &  behavior (2)
Lecture 13 requirements modeling - flow & behavior (2)
 
States machine
States machineStates machine
States machine
 
STATE DIAGRAM.pptx
STATE DIAGRAM.pptxSTATE DIAGRAM.pptx
STATE DIAGRAM.pptx
 
Chapter7
Chapter7Chapter7
Chapter7
 
Software engineering.pptx
Software engineering.pptxSoftware engineering.pptx
Software engineering.pptx
 
Software engineering.pptx
Software engineering.pptxSoftware engineering.pptx
Software engineering.pptx
 
ch2lect.ppt
ch2lect.pptch2lect.ppt
ch2lect.ppt
 
Q6. In a UML state machine diagram, 1. What is an event How is it re.pdf
Q6. In a UML state machine diagram, 1. What is an event How is it re.pdfQ6. In a UML state machine diagram, 1. What is an event How is it re.pdf
Q6. In a UML state machine diagram, 1. What is an event How is it re.pdf
 
SE18_Lec 10_ UML Behaviour and Interaction Diagrams
SE18_Lec 10_ UML Behaviour and Interaction DiagramsSE18_Lec 10_ UML Behaviour and Interaction Diagrams
SE18_Lec 10_ UML Behaviour and Interaction Diagrams
 
SE_Lec 09_ UML Behaviour Diagrams
SE_Lec 09_ UML Behaviour DiagramsSE_Lec 09_ UML Behaviour Diagrams
SE_Lec 09_ UML Behaviour Diagrams
 
UML Diagrams For Online Course Portal
UML Diagrams For Online Course PortalUML Diagrams For Online Course Portal
UML Diagrams For Online Course Portal
 
Unit two concept of classes and objects
Unit two concept of classes and objects Unit two concept of classes and objects
Unit two concept of classes and objects
 
ch04lect1.ppt
ch04lect1.pptch04lect1.ppt
ch04lect1.ppt
 
Ch05lect2 ud
Ch05lect2 udCh05lect2 ud
Ch05lect2 ud
 
M03 2 Behavioral Diagrams
M03 2 Behavioral DiagramsM03 2 Behavioral Diagrams
M03 2 Behavioral Diagrams
 
Objec oriented Analysis and design Pattern
Objec oriented Analysis and design PatternObjec oriented Analysis and design Pattern
Objec oriented Analysis and design Pattern
 
ch02lect1.ppt
ch02lect1.pptch02lect1.ppt
ch02lect1.ppt
 
ch02lect1.ppt learning education for all students
ch02lect1.ppt learning education for all studentsch02lect1.ppt learning education for all students
ch02lect1.ppt learning education for all students
 
A LITERATURE SURVEY OF COGNITIVE COMPLEXITY METRICS FOR STATECHART DIAGRAMS
A LITERATURE SURVEY OF COGNITIVE COMPLEXITY METRICS FOR STATECHART DIAGRAMSA LITERATURE SURVEY OF COGNITIVE COMPLEXITY METRICS FOR STATECHART DIAGRAMS
A LITERATURE SURVEY OF COGNITIVE COMPLEXITY METRICS FOR STATECHART DIAGRAMS
 
Free ebooks download ! Edhole
Free ebooks download ! EdholeFree ebooks download ! Edhole
Free ebooks download ! Edhole
 

More from anujabeatrice2

Chapter 8 ooad
Chapter  8 ooadChapter  8 ooad
Chapter 8 ooad
anujabeatrice2
 
Chapter 7 ooad
Chapter 7 ooadChapter 7 ooad
Chapter 7 ooad
anujabeatrice2
 
Ooad ch 1_2
Ooad ch 1_2Ooad ch 1_2
Ooad ch 1_2
anujabeatrice2
 

More from anujabeatrice2 (7)

Chapter 8 ooad
Chapter  8 ooadChapter  8 ooad
Chapter 8 ooad
 
Chapter 7 ooad
Chapter 7 ooadChapter 7 ooad
Chapter 7 ooad
 
Ooad ch 4
Ooad ch 4Ooad ch 4
Ooad ch 4
 
Ooad ch 3
Ooad ch 3Ooad ch 3
Ooad ch 3
 
Ooad ch 2
Ooad ch 2Ooad ch 2
Ooad ch 2
 
Ooad ch 1_2
Ooad ch 1_2Ooad ch 1_2
Ooad ch 1_2
 
Ooad ch 6
Ooad ch 6Ooad ch 6
Ooad ch 6
 

Recently uploaded

做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
axoqas
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
Oppotus
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
John Andrews
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
AbhimanyuSinha9
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
slg6lamcq
 
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
dwreak4tg
 
一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单
ewymefz
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdfSample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Linda486226
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
slg6lamcq
 
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptxData_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
AnirbanRoy608946
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
ewymefz
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
oz8q3jxlp
 
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
nscud
 
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
pchutichetpong
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
Subhajit Sahu
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
ewymefz
 
Machine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptxMachine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptx
balafet
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
NABLAS株式会社
 

Recently uploaded (20)

做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
 
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
 
一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdfSample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
 
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptxData_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
 
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
 
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
 
Machine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptxMachine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptx
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
 

Ooad ch 5

  • 2. Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 2 Overview:  Events  States  Transitions and Conditions  State Diagrams  State Diagram Behavior
  • 3. Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 3 Events  An event is an occurrence at a point in time, such as user depresses left button or flight 123, departs from Chicago.  Events often correspond to verbs in the past tense (power turned on, alarm set)  Events are messages sent to objects.  An event is an occurrence at a point in time, such as user depresses left button to know various options. Another example Rail departs from Mysore to Bangalore.  Events corresponds to verbs in the past tense or to the onset of some condition. The time in which an event occurs is an implicit attribute of the event.
  • 4. Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 4 Events  One event may logically precede or follow another or the two events may be unrelated.  For example two flight can arrive at two different airports. Two events are casually unrelated are said to be concurrent , they have no effect on each other.  Events include error conditions and also normal occurrences. Example timeout events , paper jammed in printer, transaction aborted etc.,  There are several kinds of events • Change event • Signal event • Time event
  • 5. Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 5 Signal Event  A signal is an explicit one-way transmission of information from one object to another.  A signal event is the event of sending or receiving a signal. Here we are more concerned about the receipt of a signal, because it causes effects in the receiving object.  A signal is a message between objects while a signal event is an occurrence in time.  Every signal transmission is a unique occurrence, but we group them into signal classes and give each signal class a name to indicate common structure and behavior.
  • 6. Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 6 Signal Event  Every signal transmission is a unique occurrence, but we group them into signal classes and give each signal class a name to indicate common structure and behavior.  Let us consider an example Kingfisher flight 123 departs from Mysore on March 23, 2010 is an instance of signal class Flight- Departure.  Some signals are simple occurrences, but most signal classes have attributes indicating the values they convey.  The UML notation is the keyword signal in guillements(<< >>) above the signal class in the top section of a box. The second section lists the signal attributes.
  • 7. Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 7 Change Event  A change event is an event that is caused by the satisfaction of a Boolean expression.  Event of the expression is continually tested – whenever the expression changes from false to true , the event occurs.  The UML notation for change event is the keyword when followed by a parenthesized Boolean expression. Time Event  A time event is an event caused by the occurrence of an absolute time or the elapse of a time interval.  The UML notation for an absolute time is the keyword when followed by a parenthesized expression involving time. The notation for a time interval is the keyword after followed by a parenthesized expression that evaluates to a time duration.
  • 8. Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 8 States  A state is an abstraction of the values and links of an object. Set of values and links are grouped together into a state according to the gross behavior of objects.  UML notation for a state – a rounded box, containing an optional state name.  The objects in a class have finite number of possible states. Each object can only be in one state at a time. Objects pass through one or more states during their lifetime.  A state specifies the response of an object to input events. All events are ignored in a state, except those for which behavior is explicitly prescribed. For example, if a digit is dialed in state Dial tone, the phone line drops the dial tone and enters state Dialing.
  • 9. Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 9 Event Vs. States  Events represent points in time. State represent intervals of time. A state corresponds to the interval between two events received by an object.  Both events and states depend on the level of abstraction. A travel agent planning an itinerary would treat each segment of a journey as a single event, an air traffic control system would break each flight into many geographical legs.
  • 10. Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 10 Transitions and conditions  A transition is an instantaneous change from one state to another. For example, when a phone is answered , the phone line transitions from the Ringing state to the Connected state. The choice of next state depends on both the original state and the event received.  A guard condition is a Boolean expression that must be true in order for a transition to occur.  A guard condition is checked only once, at the time the event occurs and the transition fires, if the condition is true.
  • 11. Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 11 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 sequences caused by events.  The state model consists of multiple state diagrams, one state diagram for each class with important temporal behavior. Sequences.  State names must be unique within the scope of a state diagram.
  • 12. Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 12 One shot state diagram  The state model consists of multiple state diagrams, one state diagram for each class with important temporal behavior.  One shot state diagrams represent objects with finite lives and have initial and final states.  The initial state is entered on creation of an object, entry of the final state implies destruction of the object.
  • 13. Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 13 Summary of Basic State Diagram Notation  State: Drawn as rounded box containing an optional name.  Transition: Drawn as a line from the origin state to the target state.  Event: A signal event is shown as a label on a transition and may be followed by parenthesized attributes.
  • 14. Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 14 State diagram behavior  An effect is a reference to a behavior that is executed in response to an event.  An activity is the actual behavior that can be invoked by any number of effects.  An activity may be performed upon a transition, upon the entry to or exit from a state, or upon some other event within a state. Activities can also represent internal control operations, a program might increment an internal counter every time a particular event occurs.
  • 15. Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 15 Activity effect  The notation for an activity is a slash(/) and the name (or description) of the activity, followed the event that causes it. The keyword do is reserved for indicating an ongoing activity and may not be used as an event name.
  • 16. Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 16 Do-activities  A do-activity is an activity that continues for an extended time. Do-activity can only occur within a state and cannot be attached to a transition.  The notation “do /” denotes a do-activity that may be performed for all or part of the duration that an object is in a state.
  • 17. Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 17 Entry and exit activity  One can bind activities to entry or to exit from a state.
  • 18. Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 18 Guard Conditions  Selection tools are not, however, non-deterministic.  The transition that is followed is determined completely by where the user clicks the mouse.  We can show this by adding guard conditions to the transitions, written in brackets after the event name.  Guard conditions are boolean expressions.  They are evaluated when a press event is received, and depending which one is true at the time of the event being received, the tool will transition to either of the “Moving” or “Error” states.
  • 19. Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 19 Guard Conditions