SlideShare ist ein Scribd-Unternehmen logo
1 von 22
UNIT I UML DIAGRAMS
Introduction to OOAD – Unified Process –
UML diagrams – Use Case – Class Diagrams–
Interaction Diagrams – State Diagrams –
Activity Diagrams –
Package, component and Deployment Diagrams.
Interaction Diagram
Describe how groups of objects
collaborate in some behavior
Introduction
• Interaction diagrams model the behavior of use cases
– By describing the way groups of objects interact to complete the task.
• The diagram shows
1. Objects involved in the use case
2. Messages that are passed b/w these objects within the use case.
• Purpose of Interaction Diagram
– To capture dynamic behaviour of a system.
– To describe the message flow in the system.
– To describe structural organization of the objects.
– To describe interaction among objects.
Types of Interaction Diagrams
• Two major kinds of interaction diagrams
1. Sequence Diagram  Show the sequence of events that occur.
2. Collaboration Diagram  Demonstrate how objects are statically connected
• Sequence diagram emphasizes on
– Time sequence of messages
• Collaboration diagram emphasizes on
– Structural organization of the objects that send and receive messages.
Sequence Vs Collaboration
• Main differences :
– Sequence diagrams show time-based object interaction
– Collaboration diagrams show how objects associate with each other.
• If the time sequence is important then sequence diagram is used
• If organization is required then collaboration diagram is used.
When to Use: Interaction Diagrams
• Interaction diagrams
– Used when you want to model the behavior of several objects in a use case.
– Demonstrate how the objects collaborate for the behavior.
– Do not give in depth representation of the behavior
• Things to be identified before drawing the interaction diagram:
– Objects taking part in the interaction.
– Message flows among the objects.
– Sequence in which the messages are flowing.
– Object organization.
Usage of Interaction Diagrams
• To model flow of control by time sequence.
• To model flow of control by structural organizations.
• For forward engineering.
• For reverse engineering.
Sequence Diagram
• Sequence Diagram models the collaboration of objects based on a time sequence.
• It shows how the objects interact with others in a particular scenario of a use case.
• This SD shows a simple scenario for the use of an automatic teller machine.
A constraint specifies 10
seconds as the max.
acceptable time interval
for the transaction.
• Sequence diagram
having 4 objects
1. Customer
2. Order
3. SpecialOrder
4. NormalOrder
Sequence Diagram – Example
Time sequence of message flows :
First call is sendOrder()
Next call is confirm ()
Last call is Dispatch ()
This diagram has shown the message sequence for SpecialOrder object
Same can be used in case ofNormalOrder object.
Consider a Use Case
• Order Entry window sends a "prepare" message to an Order.
• Order then sends "prepare" to each Order Line on the Order.
• Each Order Line checks the given Stock Item.
– If this check returns "true"
• Order Line removes the appropriate quantity of Stock Item from stock, and
• Creates a delivery item.
– If the Stock Item has fallen below the reorder level,
• That stock Item requests a reorder.
Consider a Use Case
vertical rectangles
show the objects activation
vertical dashed lines
represent the life of the object.
Message is shown by an arrow
b/w the lifelines of 2 objects
Message is
labeled
with the
message name
One can include the arguments &
control information in message
Self-call  Message that an
object sends to itself
Condition Marker show that
The message is sent
only if the condition is true
Iteration marker shows that a message is
sent many times to multiple receiver objects
Return indicates
a return from a message
Returns differ from the
regular messages in that the
line is dashed
On sequence diagram,
Arrows indicate the
messages sent
within the given use case
Consider a Use Case
X represents when the object is destroyed.
Asynchronous Message
• An asynchronous message
– Does not block the caller, so it can carry on with its own processing.
• An asynchronous message can do one of three things
1. Create a new thread, in which case it links to the top of an activation
2. Create a new object
3. Communicate with a thread that is already running
Transaction Coordinator
coordinate the checking
of the Transaction
Each Transaction Checker object is
responsible for a particular check.
Coordinator creates a number of
Transaction Checker objects
Each checker is called asynchronously
and proceeds in parallel.
When a Transaction is created,
it creates a Transaction Coordinator
When a Transaction Checker
completes, it notifies the
Transaction Coordinator.
Consider a Use Case
Textual descriptions
of what's happening
is given along the left
side of the sequence
diagram.
Objects can self-destruct
(last fig),
or
They can be destroyed
by another message
(This figure)
Collaboration Diagram
• Collaboration diagrams
– Shows the objects and their association with other objects in the system apart
from how they interact with each other.
– i.e., show the message flow between objects in an OO application
• Association between objects is not represented in a Sequence diagram.
Notations
• Objects are shown as icons
• Interaction between the objects is denoted by arrows.
• Message sequence is indicated by some numbering technique
– Number indicates how the methods are called one after another.
Example of Collaboration Diagram
Example of Collaboration Diagram
Collaboration
Diagram
Collaboration
Diagram with
Decimal Numbering
UML uses the decimal
scheme
Because it makes it
clear which operation is
calling which other
operation
07 interaction diagrams

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Sequence diagrame
Sequence diagrameSequence diagrame
Sequence diagrame
 
SAD11 - Sequence Diagrams
SAD11 - Sequence DiagramsSAD11 - Sequence Diagrams
SAD11 - Sequence Diagrams
 
Sequence diagrams
Sequence diagramsSequence diagrams
Sequence diagrams
 
Introduction to OOAD
Introduction to OOADIntroduction to OOAD
Introduction to OOAD
 
Behavioural modelling
Behavioural modellingBehavioural modelling
Behavioural modelling
 
Object Oriented Analysis Design using UML
Object Oriented Analysis Design using UMLObject Oriented Analysis Design using UML
Object Oriented Analysis Design using UML
 
Object diagram
Object diagramObject diagram
Object diagram
 
Uml - An Overview
Uml - An OverviewUml - An Overview
Uml - An Overview
 
Uml class-diagram
Uml class-diagramUml class-diagram
Uml class-diagram
 
Grasp
GraspGrasp
Grasp
 
Lecture#02, building blocks of uml ASE
Lecture#02, building blocks of uml ASELecture#02, building blocks of uml ASE
Lecture#02, building blocks of uml ASE
 
Sequence diagram
Sequence diagramSequence diagram
Sequence diagram
 
Activity diagram
Activity diagramActivity diagram
Activity diagram
 
Interaction Modeling
Interaction ModelingInteraction Modeling
Interaction Modeling
 
State chart diagram
State chart diagramState chart diagram
State chart diagram
 
Object oriented analysis and design
Object oriented analysis and designObject oriented analysis and design
Object oriented analysis and design
 
CS8592-OOAD Lecture Notes Unit-1
CS8592-OOAD Lecture Notes Unit-1CS8592-OOAD Lecture Notes Unit-1
CS8592-OOAD Lecture Notes Unit-1
 
Ooad sequence diagram lecture
Ooad sequence diagram lectureOoad sequence diagram lecture
Ooad sequence diagram lecture
 
Seq uml
Seq umlSeq uml
Seq uml
 
Class Diagram
Class DiagramClass Diagram
Class Diagram
 

Ähnlich wie 07 interaction diagrams

SE_Lec 09_ UML Behaviour Diagrams
SE_Lec 09_ UML Behaviour DiagramsSE_Lec 09_ UML Behaviour Diagrams
SE_Lec 09_ UML Behaviour DiagramsAmr E. Mohamed
 
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 DiagramsAmr E. Mohamed
 
OOAD-Unit-3.ppt UML and ANALYSISI AND DESIGN
OOAD-Unit-3.ppt UML and ANALYSISI AND DESIGNOOAD-Unit-3.ppt UML and ANALYSISI AND DESIGN
OOAD-Unit-3.ppt UML and ANALYSISI AND DESIGNKalyaniLokhande5
 
UML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussionUML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussionCherryBerry2
 
Ooad sequence diagram_collaboration diagram
Ooad sequence diagram_collaboration diagramOoad sequence diagram_collaboration diagram
Ooad sequence diagram_collaboration diagramRimshaLiaqat5
 
Basic Behavioral Modeling
Basic Behavioral ModelingBasic Behavioral Modeling
Basic Behavioral ModelingAMITJain879
 
The Ultimate Sequence Diagram Tutorial
The Ultimate Sequence Diagram TutorialThe Ultimate Sequence Diagram Tutorial
The Ultimate Sequence Diagram TutorialCreately
 
Lecture#03, uml diagrams
Lecture#03, uml diagramsLecture#03, uml diagrams
Lecture#03, uml diagramsbabak danyal
 
ملخص تحليل الانظمة وتصميمها - الوحدة السادسة
ملخص تحليل الانظمة وتصميمها - الوحدة السادسةملخص تحليل الانظمة وتصميمها - الوحدة السادسة
ملخص تحليل الانظمة وتصميمها - الوحدة السادسةجامعة القدس المفتوحة
 
Unit three Advanced State Modelling
Unit three Advanced State ModellingUnit three Advanced State Modelling
Unit three Advanced State ModellingDr Chetan Shelke
 
3 interaction and_state_modeling
3 interaction and_state_modeling3 interaction and_state_modeling
3 interaction and_state_modelingMinal Maniar
 
sequencediagram-150302224029-conversion-gate01 (1).pdf
sequencediagram-150302224029-conversion-gate01 (1).pdfsequencediagram-150302224029-conversion-gate01 (1).pdf
sequencediagram-150302224029-conversion-gate01 (1).pdfmounikanarra3
 

Ähnlich wie 07 interaction diagrams (20)

Sequence diagrams
Sequence diagramsSequence diagrams
Sequence diagrams
 
SE_Lec 09_ UML Behaviour Diagrams
SE_Lec 09_ UML Behaviour DiagramsSE_Lec 09_ UML Behaviour Diagrams
SE_Lec 09_ UML Behaviour Diagrams
 
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
 
Types of UML diagrams
Types of UML diagramsTypes of UML diagrams
Types of UML diagrams
 
OOAD-Unit-3.ppt UML and ANALYSISI AND DESIGN
OOAD-Unit-3.ppt UML and ANALYSISI AND DESIGNOOAD-Unit-3.ppt UML and ANALYSISI AND DESIGN
OOAD-Unit-3.ppt UML and ANALYSISI AND DESIGN
 
Uml
UmlUml
Uml
 
UML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussionUML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussion
 
Ooad sequence diagram_collaboration diagram
Ooad sequence diagram_collaboration diagramOoad sequence diagram_collaboration diagram
Ooad sequence diagram_collaboration diagram
 
Basic Behavioral Modeling
Basic Behavioral ModelingBasic Behavioral Modeling
Basic Behavioral Modeling
 
The Ultimate Sequence Diagram Tutorial
The Ultimate Sequence Diagram TutorialThe Ultimate Sequence Diagram Tutorial
The Ultimate Sequence Diagram Tutorial
 
Lecture#03, uml diagrams
Lecture#03, uml diagramsLecture#03, uml diagrams
Lecture#03, uml diagrams
 
ملخص تحليل الانظمة وتصميمها - الوحدة السادسة
ملخص تحليل الانظمة وتصميمها - الوحدة السادسةملخص تحليل الانظمة وتصميمها - الوحدة السادسة
ملخص تحليل الانظمة وتصميمها - الوحدة السادسة
 
Unit three Advanced State Modelling
Unit three Advanced State ModellingUnit three Advanced State Modelling
Unit three Advanced State Modelling
 
R1x g13 4 diagrams i
R1x g13 4 diagrams iR1x g13 4 diagrams i
R1x g13 4 diagrams i
 
3 interaction and_state_modeling
3 interaction and_state_modeling3 interaction and_state_modeling
3 interaction and_state_modeling
 
Chapter7
Chapter7Chapter7
Chapter7
 
sequencediagram-150302224029-conversion-gate01 (1).pdf
sequencediagram-150302224029-conversion-gate01 (1).pdfsequencediagram-150302224029-conversion-gate01 (1).pdf
sequencediagram-150302224029-conversion-gate01 (1).pdf
 
MID2 UML (1).pptx
MID2 UML (1).pptxMID2 UML (1).pptx
MID2 UML (1).pptx
 
Sequence Diagram
Sequence Diagram Sequence Diagram
Sequence Diagram
 
Sequence Diagram
Sequence Diagram Sequence Diagram
Sequence Diagram
 

Mehr von Baskarkncet

02 well formed and valid documents
02 well formed and valid documents02 well formed and valid documents
02 well formed and valid documentsBaskarkncet
 
01 xml document structure
01 xml document structure01 xml document structure
01 xml document structureBaskarkncet
 
11 deployment diagrams
11 deployment diagrams11 deployment diagrams
11 deployment diagramsBaskarkncet
 
10 component diagram
10 component diagram10 component diagram
10 component diagramBaskarkncet
 
09 package diagram
09 package diagram09 package diagram
09 package diagramBaskarkncet
 
08 state diagram and activity diagram
08 state diagram and activity diagram08 state diagram and activity diagram
08 state diagram and activity diagramBaskarkncet
 
06 class diagrams
06 class diagrams06 class diagrams
06 class diagramsBaskarkncet
 
03 unified process
03 unified process03 unified process
03 unified processBaskarkncet
 

Mehr von Baskarkncet (20)

Unit_I.pptx
Unit_I.pptxUnit_I.pptx
Unit_I.pptx
 
Cocomo model
Cocomo modelCocomo model
Cocomo model
 
Unit 1
Unit 1Unit 1
Unit 1
 
HCI
HCIHCI
HCI
 
03 x files
03 x files03 x files
03 x files
 
03 namespace
03 namespace03 namespace
03 namespace
 
02 xml schema
02 xml schema02 xml schema
02 xml schema
 
02 well formed and valid documents
02 well formed and valid documents02 well formed and valid documents
02 well formed and valid documents
 
00 introduction
00 introduction00 introduction
00 introduction
 
01 xml document structure
01 xml document structure01 xml document structure
01 xml document structure
 
11 deployment diagrams
11 deployment diagrams11 deployment diagrams
11 deployment diagrams
 
10 component diagram
10 component diagram10 component diagram
10 component diagram
 
09 package diagram
09 package diagram09 package diagram
09 package diagram
 
08 state diagram and activity diagram
08 state diagram and activity diagram08 state diagram and activity diagram
08 state diagram and activity diagram
 
06 class diagrams
06 class diagrams06 class diagrams
06 class diagrams
 
05 use case
05 use case05 use case
05 use case
 
03 unified process
03 unified process03 unified process
03 unified process
 
02 uml
02 uml02 uml
02 uml
 
04 uml diagrams
04 uml diagrams04 uml diagrams
04 uml diagrams
 
01 introduction
01 introduction01 introduction
01 introduction
 

Kürzlich hochgeladen

Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdfKamal Acharya
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptxJIT KUMAR GUPTA
 
Introduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdfIntroduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdfsumitt6_25730773
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...Amil baba
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiessarkmank1
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxpritamlangde
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilVinayVitekari
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdfKamal Acharya
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdfKamal Acharya
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxmaisarahman1
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network DevicesChandrakantDivate1
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...vershagrag
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
 
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...jabtakhaidam7
 

Kürzlich hochgeladen (20)

Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Introduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdfIntroduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdf
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech Civil
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
 

07 interaction diagrams

  • 1. UNIT I UML DIAGRAMS Introduction to OOAD – Unified Process – UML diagrams – Use Case – Class Diagrams– Interaction Diagrams – State Diagrams – Activity Diagrams – Package, component and Deployment Diagrams.
  • 2. Interaction Diagram Describe how groups of objects collaborate in some behavior
  • 3. Introduction • Interaction diagrams model the behavior of use cases – By describing the way groups of objects interact to complete the task. • The diagram shows 1. Objects involved in the use case 2. Messages that are passed b/w these objects within the use case. • Purpose of Interaction Diagram – To capture dynamic behaviour of a system. – To describe the message flow in the system. – To describe structural organization of the objects. – To describe interaction among objects.
  • 4. Types of Interaction Diagrams • Two major kinds of interaction diagrams 1. Sequence Diagram  Show the sequence of events that occur. 2. Collaboration Diagram  Demonstrate how objects are statically connected • Sequence diagram emphasizes on – Time sequence of messages • Collaboration diagram emphasizes on – Structural organization of the objects that send and receive messages.
  • 5. Sequence Vs Collaboration • Main differences : – Sequence diagrams show time-based object interaction – Collaboration diagrams show how objects associate with each other. • If the time sequence is important then sequence diagram is used • If organization is required then collaboration diagram is used.
  • 6. When to Use: Interaction Diagrams • Interaction diagrams – Used when you want to model the behavior of several objects in a use case. – Demonstrate how the objects collaborate for the behavior. – Do not give in depth representation of the behavior • Things to be identified before drawing the interaction diagram: – Objects taking part in the interaction. – Message flows among the objects. – Sequence in which the messages are flowing. – Object organization.
  • 7. Usage of Interaction Diagrams • To model flow of control by time sequence. • To model flow of control by structural organizations. • For forward engineering. • For reverse engineering.
  • 8. Sequence Diagram • Sequence Diagram models the collaboration of objects based on a time sequence. • It shows how the objects interact with others in a particular scenario of a use case. • This SD shows a simple scenario for the use of an automatic teller machine. A constraint specifies 10 seconds as the max. acceptable time interval for the transaction.
  • 9. • Sequence diagram having 4 objects 1. Customer 2. Order 3. SpecialOrder 4. NormalOrder Sequence Diagram – Example Time sequence of message flows : First call is sendOrder() Next call is confirm () Last call is Dispatch () This diagram has shown the message sequence for SpecialOrder object Same can be used in case ofNormalOrder object.
  • 10. Consider a Use Case • Order Entry window sends a "prepare" message to an Order. • Order then sends "prepare" to each Order Line on the Order. • Each Order Line checks the given Stock Item. – If this check returns "true" • Order Line removes the appropriate quantity of Stock Item from stock, and • Creates a delivery item. – If the Stock Item has fallen below the reorder level, • That stock Item requests a reorder.
  • 11. Consider a Use Case vertical rectangles show the objects activation vertical dashed lines represent the life of the object. Message is shown by an arrow b/w the lifelines of 2 objects Message is labeled with the message name One can include the arguments & control information in message Self-call  Message that an object sends to itself Condition Marker show that The message is sent only if the condition is true Iteration marker shows that a message is sent many times to multiple receiver objects
  • 12. Return indicates a return from a message Returns differ from the regular messages in that the line is dashed On sequence diagram, Arrows indicate the messages sent within the given use case Consider a Use Case X represents when the object is destroyed.
  • 13. Asynchronous Message • An asynchronous message – Does not block the caller, so it can carry on with its own processing. • An asynchronous message can do one of three things 1. Create a new thread, in which case it links to the top of an activation 2. Create a new object 3. Communicate with a thread that is already running
  • 14. Transaction Coordinator coordinate the checking of the Transaction Each Transaction Checker object is responsible for a particular check. Coordinator creates a number of Transaction Checker objects Each checker is called asynchronously and proceeds in parallel. When a Transaction is created, it creates a Transaction Coordinator When a Transaction Checker completes, it notifies the Transaction Coordinator. Consider a Use Case
  • 15. Textual descriptions of what's happening is given along the left side of the sequence diagram. Objects can self-destruct (last fig), or They can be destroyed by another message (This figure)
  • 16. Collaboration Diagram • Collaboration diagrams – Shows the objects and their association with other objects in the system apart from how they interact with each other. – i.e., show the message flow between objects in an OO application • Association between objects is not represented in a Sequence diagram.
  • 17. Notations • Objects are shown as icons • Interaction between the objects is denoted by arrows. • Message sequence is indicated by some numbering technique – Number indicates how the methods are called one after another.
  • 21. Collaboration Diagram with Decimal Numbering UML uses the decimal scheme Because it makes it clear which operation is calling which other operation