SlideShare a Scribd company logo
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 S.W. Lau and Y.K.
Leung
McGraw-Hill Education (Asia), 2005
2
References
 Chapter 4, Object-Oriented Technology:
From diagram to code with Visual
Paradigm for UML
 Chapters 15, 18, 21, The UML User
Guide
3
What You Will Learn
 Model message flows using sequence
diagrams.
 Model message flows using the collaboration
diagrams.
 Model lifetime behaviors of an object using
state chart diagrams.
 Model performance of actions of a procedure
or an activity using activity diagrams.
4
Scenario Modeling
Techniques – Interaction
Diagramme
 Scenario modeling describes how the objects
in a system interact with each other in a
scenario.
 A scenario is a sequence of events that
occurs during one particular execution path
within a use case of a system.
 Each event involves the interaction of objects
passing messages between them.
5
Scenario Modeling
Techniques – Interaction
Diagramme (cont’d)
 An interaction diagram can be used to model the
collaborating objects in scenarios, showing the
 objects involved in the scenario and
 the messages sent and received by them.
 These objects may be external or internal to the system.
 The messages represent the invocation of operations of
the receiving objects.
 Two kinds of interaction diagrams: sequence diagrams
and collaboration diagrams.
 Sequence diagrams focus on the time sequencing of
messages.
 Collaboration diagrams focus on the structural
organization of the links between collaborating objects.
6
Common UML Interaction
Diagram Notation
 Object Symbol
Naming Format Notation
An object of an unspecified
class.
A named object of a specified
class.
An unnamed object of a
specified class.
7
Object Stereotype
Object
Category
Description Graphical Notations
Actor Object An external entity that
interacts with the
system.
Entity Object An object that models
the data in the system.
It often represents an
object in the problem
domain.
8
Object Stereotype (cont’d)
Object
Category
Description Graphical Notations
Boundary
Object
An object that handles
the communication
between actor objects
and the system.
Control Object An object that models
the flow of control and
functionality that do
not naturally belong to
entity objects or
boundary objects.
9
Messages
Message Description Notation
Procedure call or
other nested flow
of control
The message sender waits
for the completion of the
procedure call of the
message receiver.
Asynchronous
communication
The sender dispatches a
message and immediately
continues with the next step
of execution.
10
Messages (cont’d)
Message Description Notation
Return message Message returned from the
procedure call.
Message with
travel delay
The message will take a
significant amount of time to
arrive at the receiving
object. (This is only used in
sequence diagrams.)
11
Sequence Diagrams
 Interaction diagram: models the behavior of a
group of objects that work together to achieve a
user goal.
 A sequence diagram helps us identify a set of
collaborating objects involved in a scenario of a use
case.
 A sequence diagram has two dimensions: the
vertical dimension and the horizontal dimension,
respectively
 Object icons are placed horizontally at the top of the
sequence diagram, and messages are passed
between them.
12
Sequence Diagrams (cont’d)
13
Life Line & Activation
Object with
Lifeline
Object with
Activation
14
Creation & Destruction
Object
Destruction
Object
Destruction
15
Branching
Conditional
Message
Transmission
16
Message that Takes Time
Message Transmission that Takes Time
17
Iteration
Iteration
18
Alternate Message Reception
Alternate
Message
Reception
19
Recursion
Recursion
20
Example
Life line
Creation
Deletion
21
Example
Life line
Activation
iteration
22
Example
Life line
collective
iteration
23
Example
Concurrent
Branch
24
Collaboration Diagrams
 Collaboration diagrams provide another way to model a
scenario.
 Shows the roles of objects and associations of objects in an
instance of collaboration.
 Focus on structures of the objects rather than temporal
sequence of operations.
 In a collaboration diagram, each object is represented by an
object icon, and links are used to indicate communication paths
on which messages are transmitted.
 Collaboration diagram = object diagram + messages between
objects.
 Messages are presented in the same way as those in a
sequence diagram; in fact, sequence diagrams and
collaboration diagrams are semantically equivalent.
25
Collaboration Diagrams
(cont’d)
26
Example – Telephone System
27
Example – Message with Duration
28
Example – An Automatic
Teller Machine (ATM)
 The ATM prompts the user to insert a card.
 The user inserts an ATM card.
 The ATM prompts the user to input the PIN.
 The user enters the PIN.
 The ATM asks the bank consortium to verify the ATM card number and
PIN.
 The bank consortium verifies the ATM card number and PIN with bank.
 The bank notifies the bank consortium that the PIN is correct.
 The bank consortium notifies the ATM the PIN is correct.
 The ATM prompts the user to select a service.
 The user selects the withdraw cash service.
 The ATM prompts the user to enter the amount to withdraw.
29
Example 1 – An Automatic
Teller Machine (cont’d)
 The user enters the amount to withdraw.
 The ATM asks the bank consortium to process the request. The bank
consortium forwards the request to bank.
 The bank confirms the successful execution of the request to the bank
consortium which in turn notifies the ATM that the request has been
approved.
 The ATM displays the successful transaction screen, ejects card and
then dispenses cash requested.
 The ATM shows the main menu to the user for selecting the next
service.
30
Example – An Automatic
Teller Machine (cont’d)
31
Example – An Automatic
Teller Machine (cont’d)
32
Example – An Automatic
Teller Machine (cont’d)
33
Example - A Soft Drink
Vending Machine
34
Example - A Soft Drink
Vending Machine (cont’d)
35
Dynamic Modeling Techniques
Using Statechart Diagrams
 The behavior of an entity is not only a direct
consequence of its inputs, but it also depends on its
preceding state.
 The past history of an entity can best be modeled by
a finite statechart diagram traditionally named
“automata”.
 Statechart diagrams (or sometimes referred to as
state diagrams) show the different states of an entity.
 Statechart diagrams can also show how an entity
responds to various events by changing from one
state to another.  
36
What Is a State?
 According to Rumbaugh et al. “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
behavior of the object.”
 For example, consider you have $100,000 in a
bank account. The behavior of the withdraw
function would be:
 balance := balance – withdrawAmount; provided that the
balance after the withdrawal is not less than $0;
 However, if the account balance becomes negative after
a withdrawal, the behavior of the withdraw function would
be quite different.
37
What Is a State?(cont’d)
 There are several characteristics of states:
 A state occupies an interval of time.
 A state is often associated with an abstraction of
attribute values of an entity satisfying some condition(s).
 An entity changes its state not only as a direct
consequence of the current input, but it is also
dependent on some past history of its inputs.
38
UML Notation
39
UML Notation (cont’d)
Action or activity Description
entry/ action 1; …; action n Upon entry to the state, the specified
actions are performed.
exit/ action 1; …; action n Upon exit from the state, the specified
actions are performed.
do/ activity The specified activity is performed
continuously while in this state.
event-name(parameters)
[guard-condition] / action
1 ; …; action n
An internal transition is fired when the
specified event occurs and the
specified guard condition is true. The
specified actions are performed when
the transition is fired.
40
UML Notation (cont’d)
Initial state
Final state
State
History state
Junction state
Concurrent composite state
Transition
41
Transition
 A transition from one state to another
takes place instantaneously in response
to some external events or internal
stimuli.
42
Transition (cont’d)
 A transition is fired when the following
conditions are satisfied:
 The entity is in the state of the source state.
 An event specified in the label occurs.
 The guard condition specified in the label is
evaluated to be true.
 When a transition is fired, the actions
associated with it are executed.
43
Composite State
44
Composite State (cont’d)

More Related Content

What's hot

5.state diagrams
5.state diagrams5.state diagrams
5.state diagrams
APU
 
Software Engineering :Behavioral Modelling - II State diagram
Software Engineering :Behavioral Modelling - II State diagramSoftware Engineering :Behavioral Modelling - II State diagram
Software Engineering :Behavioral Modelling - II State diagram
Ajit Nayak
 
Software System Engineering - Chapter 14
Software System Engineering - Chapter 14Software System Engineering - Chapter 14
Software System Engineering - Chapter 14
Fadhil Ismail
 
Slide 4 Interaction Diagram
Slide 4 Interaction DiagramSlide 4 Interaction Diagram
Slide 4 Interaction Diagram
Niloy Rocker
 
Software System Engineering - Chapter 12
Software System Engineering - Chapter 12Software System Engineering - Chapter 12
Software System Engineering - Chapter 12
Fadhil Ismail
 
Ooad ch 5
Ooad ch 5Ooad ch 5
Ooad ch 5
anujabeatrice2
 
Recognition of Handwritten Mathematical Equations
Recognition of  Handwritten Mathematical EquationsRecognition of  Handwritten Mathematical Equations
Recognition of Handwritten Mathematical Equations
IRJET Journal
 
Unified Modeling Language (UML), Object-Oriented Programming Concepts & Desig...
Unified Modeling Language (UML), Object-Oriented Programming Concepts & Desig...Unified Modeling Language (UML), Object-Oriented Programming Concepts & Desig...
Unified Modeling Language (UML), Object-Oriented Programming Concepts & Desig...
Isuru Perera
 
Free ebooks download ! Edhole
Free ebooks download ! EdholeFree ebooks download ! Edhole
Free ebooks download ! Edhole
Edhole.com
 
08 state diagram and activity diagram
08 state diagram and activity diagram08 state diagram and activity diagram
08 state diagram and activity diagram
Baskarkncet
 
Lesson 32
Lesson 32Lesson 32
Lesson 32
Avijit Kumar
 
Uml Diagrams
Uml DiagramsUml Diagrams
Uml Diagrams
Nirmal Sharma
 
State chart diagram
State chart diagramState chart diagram
State chart diagram
Preeti Mishra
 
Software System Engineering - Chapter 13
Software System Engineering - Chapter 13Software System Engineering - Chapter 13
Software System Engineering - Chapter 13
Fadhil Ismail
 
Machine learning Mind Map
Machine learning Mind MapMachine learning Mind Map
Machine learning Mind Map
Ashish Patel
 
State Diagrams
State DiagramsState Diagrams
State Diagrams
Vaidik Trivedi
 
Deep learning MindMap
Deep learning MindMapDeep learning MindMap
Deep learning MindMap
Ashish Patel
 
Analysis and Design of Algorithms notes
Analysis and Design of Algorithms  notesAnalysis and Design of Algorithms  notes
Analysis and Design of Algorithms notes
Prof. Dr. K. Adisesha
 
UML tutorial
UML tutorialUML tutorial
UML tutorial
Eliza Wright
 
mit-watch-what-i-do-chronology
mit-watch-what-i-do-chronologymit-watch-what-i-do-chronology
mit-watch-what-i-do-chronology
Alan Turransky
 

What's hot (20)

5.state diagrams
5.state diagrams5.state diagrams
5.state diagrams
 
Software Engineering :Behavioral Modelling - II State diagram
Software Engineering :Behavioral Modelling - II State diagramSoftware Engineering :Behavioral Modelling - II State diagram
Software Engineering :Behavioral Modelling - II State diagram
 
Software System Engineering - Chapter 14
Software System Engineering - Chapter 14Software System Engineering - Chapter 14
Software System Engineering - Chapter 14
 
Slide 4 Interaction Diagram
Slide 4 Interaction DiagramSlide 4 Interaction Diagram
Slide 4 Interaction Diagram
 
Software System Engineering - Chapter 12
Software System Engineering - Chapter 12Software System Engineering - Chapter 12
Software System Engineering - Chapter 12
 
Ooad ch 5
Ooad ch 5Ooad ch 5
Ooad ch 5
 
Recognition of Handwritten Mathematical Equations
Recognition of  Handwritten Mathematical EquationsRecognition of  Handwritten Mathematical Equations
Recognition of Handwritten Mathematical Equations
 
Unified Modeling Language (UML), Object-Oriented Programming Concepts & Desig...
Unified Modeling Language (UML), Object-Oriented Programming Concepts & Desig...Unified Modeling Language (UML), Object-Oriented Programming Concepts & Desig...
Unified Modeling Language (UML), Object-Oriented Programming Concepts & Desig...
 
Free ebooks download ! Edhole
Free ebooks download ! EdholeFree ebooks download ! Edhole
Free ebooks download ! Edhole
 
08 state diagram and activity diagram
08 state diagram and activity diagram08 state diagram and activity diagram
08 state diagram and activity diagram
 
Lesson 32
Lesson 32Lesson 32
Lesson 32
 
Uml Diagrams
Uml DiagramsUml Diagrams
Uml Diagrams
 
State chart diagram
State chart diagramState chart diagram
State chart diagram
 
Software System Engineering - Chapter 13
Software System Engineering - Chapter 13Software System Engineering - Chapter 13
Software System Engineering - Chapter 13
 
Machine learning Mind Map
Machine learning Mind MapMachine learning Mind Map
Machine learning Mind Map
 
State Diagrams
State DiagramsState Diagrams
State Diagrams
 
Deep learning MindMap
Deep learning MindMapDeep learning MindMap
Deep learning MindMap
 
Analysis and Design of Algorithms notes
Analysis and Design of Algorithms  notesAnalysis and Design of Algorithms  notes
Analysis and Design of Algorithms notes
 
UML tutorial
UML tutorialUML tutorial
UML tutorial
 
mit-watch-what-i-do-chronology
mit-watch-what-i-do-chronologymit-watch-what-i-do-chronology
mit-watch-what-i-do-chronology
 

Similar to Jar chapter 4, part 1

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
 
Use case model
Use case modelUse case model
Use case model
Ashwani Kumar
 
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
 
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
 
CS8592-OOAD Lecture Notes Unit-3
CS8592-OOAD Lecture Notes Unit-3CS8592-OOAD Lecture Notes Unit-3
CS8592-OOAD Lecture Notes Unit-3
Gobinath Subramaniam
 
Jar chapter 4_part_ii
Jar chapter 4_part_iiJar chapter 4_part_ii
Jar chapter 4_part_ii
Reham Maher El-Safarini
 
UML.pptx
UML.pptxUML.pptx
UML.pptx
RAJESH S
 
Chapter7
Chapter7Chapter7
Chapter7
Dang Tuan
 
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
 
Uml and enterprise architect
Uml and enterprise architectUml and enterprise architect
Uml and enterprise architect
Md Touhidul Alam Shuvo
 
Basic Behavioral Modeling
Basic Behavioral ModelingBasic Behavioral Modeling
Basic Behavioral Modeling
AMITJain879
 
Uml Omg Fundamental Certification 5
Uml Omg Fundamental Certification 5Uml Omg Fundamental Certification 5
Uml Omg Fundamental Certification 5
Ricardo Quintero
 
Lecture 4.pdf
Lecture 4.pdfLecture 4.pdf
Lecture 4.pdf
amanuel236786
 
Jar chapter 3
Jar chapter 3Jar chapter 3
Java
Java   Java
Basic behavioral modeling chapter 3 of OMD
Basic behavioral modeling chapter 3 of OMDBasic behavioral modeling chapter 3 of OMD
Basic behavioral modeling chapter 3 of OMD
jayashri kolekar
 
SE18_Lec 09_UML Use Cases
SE18_Lec 09_UML Use CasesSE18_Lec 09_UML Use Cases
SE18_Lec 09_UML Use Cases
Amr E. Mohamed
 
Umldiagram
UmldiagramUmldiagram
Umldiagram
pavandeep11
 
IoT in salsa Serverless
IoT in salsa ServerlessIoT in salsa Serverless
IoT in salsa Serverless
Massimo Bonanni
 
Unit-1 Mod-Sim.ppt
Unit-1 Mod-Sim.pptUnit-1 Mod-Sim.ppt
Unit-1 Mod-Sim.ppt
DEVANGBAJPAI2
 

Similar to Jar chapter 4, part 1 (20)

SE_Lec 09_ UML Behaviour Diagrams
SE_Lec 09_ UML Behaviour DiagramsSE_Lec 09_ UML Behaviour Diagrams
SE_Lec 09_ UML Behaviour Diagrams
 
Use case model
Use case modelUse case model
Use case model
 
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
 
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)
 
CS8592-OOAD Lecture Notes Unit-3
CS8592-OOAD Lecture Notes Unit-3CS8592-OOAD Lecture Notes Unit-3
CS8592-OOAD Lecture Notes Unit-3
 
Jar chapter 4_part_ii
Jar chapter 4_part_iiJar chapter 4_part_ii
Jar chapter 4_part_ii
 
UML.pptx
UML.pptxUML.pptx
UML.pptx
 
Chapter7
Chapter7Chapter7
Chapter7
 
UML Diagrams For Online Course Portal
UML Diagrams For Online Course PortalUML Diagrams For Online Course Portal
UML Diagrams For Online Course Portal
 
Uml and enterprise architect
Uml and enterprise architectUml and enterprise architect
Uml and enterprise architect
 
Basic Behavioral Modeling
Basic Behavioral ModelingBasic Behavioral Modeling
Basic Behavioral Modeling
 
Uml Omg Fundamental Certification 5
Uml Omg Fundamental Certification 5Uml Omg Fundamental Certification 5
Uml Omg Fundamental Certification 5
 
Lecture 4.pdf
Lecture 4.pdfLecture 4.pdf
Lecture 4.pdf
 
Jar chapter 3
Jar chapter 3Jar chapter 3
Jar chapter 3
 
Java
Java   Java
Java
 
Basic behavioral modeling chapter 3 of OMD
Basic behavioral modeling chapter 3 of OMDBasic behavioral modeling chapter 3 of OMD
Basic behavioral modeling chapter 3 of OMD
 
SE18_Lec 09_UML Use Cases
SE18_Lec 09_UML Use CasesSE18_Lec 09_UML Use Cases
SE18_Lec 09_UML Use Cases
 
Umldiagram
UmldiagramUmldiagram
Umldiagram
 
IoT in salsa Serverless
IoT in salsa ServerlessIoT in salsa Serverless
IoT in salsa Serverless
 
Unit-1 Mod-Sim.ppt
Unit-1 Mod-Sim.pptUnit-1 Mod-Sim.ppt
Unit-1 Mod-Sim.ppt
 

More from Reham Maher El-Safarini

Ux
Ux Ux
Global threat-landscape report by fortinet.
Global threat-landscape report by fortinet.Global threat-landscape report by fortinet.
Global threat-landscape report by fortinet.
Reham Maher El-Safarini
 
Dynamics AX/ X++
Dynamics AX/ X++Dynamics AX/ X++
Dynamics AX/ X++
Reham Maher El-Safarini
 
Microsoft sql-and-the-gdpr
Microsoft sql-and-the-gdprMicrosoft sql-and-the-gdpr
Microsoft sql-and-the-gdpr
Reham Maher El-Safarini
 
AWS Cloud economics
AWS Cloud economicsAWS Cloud economics
AWS Cloud economics
Reham Maher El-Safarini
 
Cloud skills development
Cloud skills developmentCloud skills development
Cloud skills development
Reham Maher El-Safarini
 
AWS cloud adoption framework (caf)
AWS cloud adoption framework (caf)AWS cloud adoption framework (caf)
AWS cloud adoption framework (caf)
Reham Maher El-Safarini
 
Application and database migration workshop
Application and database migration workshopApplication and database migration workshop
Application and database migration workshop
Reham Maher El-Safarini
 
Containers on AWS
Containers on AWSContainers on AWS
Containers on AWS
Reham Maher El-Safarini
 
Security and governance with aws control tower and aws organizations
Security and governance with aws control tower and aws organizationsSecurity and governance with aws control tower and aws organizations
Security and governance with aws control tower and aws organizations
Reham Maher El-Safarini
 
Digital transformation on aws
Digital transformation on awsDigital transformation on aws
Digital transformation on aws
Reham Maher El-Safarini
 
Security in the cloud
Security in the cloudSecurity in the cloud
Security in the cloud
Reham Maher El-Safarini
 
2. migration, disaster recovery and business continuity in the cloud
2. migration, disaster recovery and business continuity in the cloud2. migration, disaster recovery and business continuity in the cloud
2. migration, disaster recovery and business continuity in the cloud
Reham Maher El-Safarini
 
1. aws overview
1. aws overview1. aws overview
1. aws overview
Reham Maher El-Safarini
 
Pgp
PgpPgp
ssl for securing
ssl for securingssl for securing
ssl for securing
Reham Maher El-Safarini
 
03 unity 3_d_part_2
03 unity 3_d_part_203 unity 3_d_part_2
03 unity 3_d_part_2
Reham Maher El-Safarini
 
02 unity 3_d_part_1
02 unity 3_d_part_102 unity 3_d_part_1
02 unity 3_d_part_1
Reham Maher El-Safarini
 
01 unity 3_d_introduction
01 unity 3_d_introduction01 unity 3_d_introduction
01 unity 3_d_introduction
Reham Maher El-Safarini
 
unity basics
unity basicsunity basics

More from Reham Maher El-Safarini (20)

Ux
Ux Ux
Ux
 
Global threat-landscape report by fortinet.
Global threat-landscape report by fortinet.Global threat-landscape report by fortinet.
Global threat-landscape report by fortinet.
 
Dynamics AX/ X++
Dynamics AX/ X++Dynamics AX/ X++
Dynamics AX/ X++
 
Microsoft sql-and-the-gdpr
Microsoft sql-and-the-gdprMicrosoft sql-and-the-gdpr
Microsoft sql-and-the-gdpr
 
AWS Cloud economics
AWS Cloud economicsAWS Cloud economics
AWS Cloud economics
 
Cloud skills development
Cloud skills developmentCloud skills development
Cloud skills development
 
AWS cloud adoption framework (caf)
AWS cloud adoption framework (caf)AWS cloud adoption framework (caf)
AWS cloud adoption framework (caf)
 
Application and database migration workshop
Application and database migration workshopApplication and database migration workshop
Application and database migration workshop
 
Containers on AWS
Containers on AWSContainers on AWS
Containers on AWS
 
Security and governance with aws control tower and aws organizations
Security and governance with aws control tower and aws organizationsSecurity and governance with aws control tower and aws organizations
Security and governance with aws control tower and aws organizations
 
Digital transformation on aws
Digital transformation on awsDigital transformation on aws
Digital transformation on aws
 
Security in the cloud
Security in the cloudSecurity in the cloud
Security in the cloud
 
2. migration, disaster recovery and business continuity in the cloud
2. migration, disaster recovery and business continuity in the cloud2. migration, disaster recovery and business continuity in the cloud
2. migration, disaster recovery and business continuity in the cloud
 
1. aws overview
1. aws overview1. aws overview
1. aws overview
 
Pgp
PgpPgp
Pgp
 
ssl for securing
ssl for securingssl for securing
ssl for securing
 
03 unity 3_d_part_2
03 unity 3_d_part_203 unity 3_d_part_2
03 unity 3_d_part_2
 
02 unity 3_d_part_1
02 unity 3_d_part_102 unity 3_d_part_1
02 unity 3_d_part_1
 
01 unity 3_d_introduction
01 unity 3_d_introduction01 unity 3_d_introduction
01 unity 3_d_introduction
 
unity basics
unity basicsunity basics
unity basics
 

Recently uploaded

BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
RAHUL
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5
sayalidalavi006
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
paigestewart1632
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
simonomuemu
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 

Recently uploaded (20)

BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 

Jar chapter 4, part 1

  • 1. 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 S.W. Lau and Y.K. Leung McGraw-Hill Education (Asia), 2005
  • 2. 2 References  Chapter 4, Object-Oriented Technology: From diagram to code with Visual Paradigm for UML  Chapters 15, 18, 21, The UML User Guide
  • 3. 3 What You Will Learn  Model message flows using sequence diagrams.  Model message flows using the collaboration diagrams.  Model lifetime behaviors of an object using state chart diagrams.  Model performance of actions of a procedure or an activity using activity diagrams.
  • 4. 4 Scenario Modeling Techniques – Interaction Diagramme  Scenario modeling describes how the objects in a system interact with each other in a scenario.  A scenario is a sequence of events that occurs during one particular execution path within a use case of a system.  Each event involves the interaction of objects passing messages between them.
  • 5. 5 Scenario Modeling Techniques – Interaction Diagramme (cont’d)  An interaction diagram can be used to model the collaborating objects in scenarios, showing the  objects involved in the scenario and  the messages sent and received by them.  These objects may be external or internal to the system.  The messages represent the invocation of operations of the receiving objects.  Two kinds of interaction diagrams: sequence diagrams and collaboration diagrams.  Sequence diagrams focus on the time sequencing of messages.  Collaboration diagrams focus on the structural organization of the links between collaborating objects.
  • 6. 6 Common UML Interaction Diagram Notation  Object Symbol Naming Format Notation An object of an unspecified class. A named object of a specified class. An unnamed object of a specified class.
  • 7. 7 Object Stereotype Object Category Description Graphical Notations Actor Object An external entity that interacts with the system. Entity Object An object that models the data in the system. It often represents an object in the problem domain.
  • 8. 8 Object Stereotype (cont’d) Object Category Description Graphical Notations Boundary Object An object that handles the communication between actor objects and the system. Control Object An object that models the flow of control and functionality that do not naturally belong to entity objects or boundary objects.
  • 9. 9 Messages Message Description Notation Procedure call or other nested flow of control The message sender waits for the completion of the procedure call of the message receiver. Asynchronous communication The sender dispatches a message and immediately continues with the next step of execution.
  • 10. 10 Messages (cont’d) Message Description Notation Return message Message returned from the procedure call. Message with travel delay The message will take a significant amount of time to arrive at the receiving object. (This is only used in sequence diagrams.)
  • 11. 11 Sequence Diagrams  Interaction diagram: models the behavior of a group of objects that work together to achieve a user goal.  A sequence diagram helps us identify a set of collaborating objects involved in a scenario of a use case.  A sequence diagram has two dimensions: the vertical dimension and the horizontal dimension, respectively  Object icons are placed horizontally at the top of the sequence diagram, and messages are passed between them.
  • 13. 13 Life Line & Activation Object with Lifeline Object with Activation
  • 16. 16 Message that Takes Time Message Transmission that Takes Time
  • 24. 24 Collaboration Diagrams  Collaboration diagrams provide another way to model a scenario.  Shows the roles of objects and associations of objects in an instance of collaboration.  Focus on structures of the objects rather than temporal sequence of operations.  In a collaboration diagram, each object is represented by an object icon, and links are used to indicate communication paths on which messages are transmitted.  Collaboration diagram = object diagram + messages between objects.  Messages are presented in the same way as those in a sequence diagram; in fact, sequence diagrams and collaboration diagrams are semantically equivalent.
  • 27. 27 Example – Message with Duration
  • 28. 28 Example – An Automatic Teller Machine (ATM)  The ATM prompts the user to insert a card.  The user inserts an ATM card.  The ATM prompts the user to input the PIN.  The user enters the PIN.  The ATM asks the bank consortium to verify the ATM card number and PIN.  The bank consortium verifies the ATM card number and PIN with bank.  The bank notifies the bank consortium that the PIN is correct.  The bank consortium notifies the ATM the PIN is correct.  The ATM prompts the user to select a service.  The user selects the withdraw cash service.  The ATM prompts the user to enter the amount to withdraw.
  • 29. 29 Example 1 – An Automatic Teller Machine (cont’d)  The user enters the amount to withdraw.  The ATM asks the bank consortium to process the request. The bank consortium forwards the request to bank.  The bank confirms the successful execution of the request to the bank consortium which in turn notifies the ATM that the request has been approved.  The ATM displays the successful transaction screen, ejects card and then dispenses cash requested.  The ATM shows the main menu to the user for selecting the next service.
  • 30. 30 Example – An Automatic Teller Machine (cont’d)
  • 31. 31 Example – An Automatic Teller Machine (cont’d)
  • 32. 32 Example – An Automatic Teller Machine (cont’d)
  • 33. 33 Example - A Soft Drink Vending Machine
  • 34. 34 Example - A Soft Drink Vending Machine (cont’d)
  • 35. 35 Dynamic Modeling Techniques Using Statechart Diagrams  The behavior of an entity is not only a direct consequence of its inputs, but it also depends on its preceding state.  The past history of an entity can best be modeled by a finite statechart diagram traditionally named “automata”.  Statechart diagrams (or sometimes referred to as state diagrams) show the different states of an entity.  Statechart diagrams can also show how an entity responds to various events by changing from one state to another.  
  • 36. 36 What Is a State?  According to Rumbaugh et al. “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 behavior of the object.”  For example, consider you have $100,000 in a bank account. The behavior of the withdraw function would be:  balance := balance – withdrawAmount; provided that the balance after the withdrawal is not less than $0;  However, if the account balance becomes negative after a withdrawal, the behavior of the withdraw function would be quite different.
  • 37. 37 What Is a State?(cont’d)  There are several characteristics of states:  A state occupies an interval of time.  A state is often associated with an abstraction of attribute values of an entity satisfying some condition(s).  An entity changes its state not only as a direct consequence of the current input, but it is also dependent on some past history of its inputs.
  • 39. 39 UML Notation (cont’d) Action or activity Description entry/ action 1; …; action n Upon entry to the state, the specified actions are performed. exit/ action 1; …; action n Upon exit from the state, the specified actions are performed. do/ activity The specified activity is performed continuously while in this state. event-name(parameters) [guard-condition] / action 1 ; …; action n An internal transition is fired when the specified event occurs and the specified guard condition is true. The specified actions are performed when the transition is fired.
  • 40. 40 UML Notation (cont’d) Initial state Final state State History state Junction state Concurrent composite state Transition
  • 41. 41 Transition  A transition from one state to another takes place instantaneously in response to some external events or internal stimuli.
  • 42. 42 Transition (cont’d)  A transition is fired when the following conditions are satisfied:  The entity is in the state of the source state.  An event specified in the label occurs.  The guard condition specified in the label is evaluated to be true.  When a transition is fired, the actions associated with it are executed.

Editor's Notes

  1. <number>
  2. <number>
  3. <number>
  4. <number>
  5. <number>