2
Most read
3
Most read
13
Most read
SEQUENCE DIAGRAMS &
COMMUNICATION DIAGRAMS
By,
D. B. Naga Muruga,
Dept of Mechanical Engineering
Sriram Engineering College
Class and Object Diagrams
UML structure diagrams
Interaction Diagrams
• Describe how objects collaborate to achieve some behavior
Consider a use case
• We have an order
• We are going to calculate its price
• Order needs to look at all its line items
– determine price of line item based on the pricing rules of its
product
Sequence diagrams  & communication diagrams
Another sequence diagram of the use case
Creating and deleting participants
Interaction Frames
• Sequence diagrams are not suitable for
showing complex control flow
• Instead use
– pseudocode
– activity diagrams
• Use interaction frames to describe simple
control logic
Format of interaction frames
Example
Sequence diagrams  & communication diagrams
Control logic in UML 1
• Iteration marker (*) on message
– iteration basis given in “[]”
• Guards
– message conditions in “[]”
• Problem: only works on a single message
– Solution: use self-call by a pseudo message
to show scope
Sequence diagrams  & communication diagrams
Synchronous and Asynchronous
messages
• Synchronous
– The sender object must wait for the receiver
object to finish
– symbol UML 2 UML <1.4
• Asynchronous
– The sender object can carry on without
waiting
– symbol UML 2 UML <1.4
Communication Diagrams
• Focus on the data links between objects
• Communication diagrams are graphs
– Nodes: Objects
– Edges: Association and transient links
messages are arrows on links
• Communication sequence given by
numbering scheme
Centralized pricing example
Centralized pricing example
Other conventions
• You can show several computations in one
diagram
– 1.1, 1.2.1, 1.2.2, 1.3, …
– 2.1, 2.2, 2.3.1, 2.3.2,…
• You can use letters to indicate different threads
– A1.1, A1.2.1, A1.2.2,…
– B1.1, B1.2.1, B1.2.2,…
• You can use iteration markers “*” and guards []
to show control logic, but no complete constructs
• A matter of personal taste
• Sequence diagrams better when you want
to emphasize sequence of calls
• Communication diagrams better when you
want to emphasize links
How to choose between sequence
and communication diagrams
Dog Fun
• Each customer has one or more dogs
• I keep track of the customers’ kind of dogs and email so I can send them greetings at
Christmas and new offers
[if they want]. I also keep track of how much they have spent
• The system helps me compute how much the customer should pay for the treatments
of the dogs the customer
brings
• A treatment starts with a wash that has a fixed cost of 10$ no matter what kind of dog
• Then there are three kinds of ways to continue a
treatment:
1. puddle-cut which can be NY-style to $100 or London to $50
(London style may include coloring for an extra $10) [I decline to puddle cut a dog that’s not a puddle]
2. trim-cut for $30, or
3. style-cut for $40
• Some of my costumers get a discount of some percent, but not all
Alice visits Dog Fun to have her dog in for a NY-style cut.
Show how the visits collection of Alice is updated.
Sequence diagrams  & communication diagrams
Sequence diagrams  & communication diagrams

More Related Content

PPTX
SAD11 - Sequence Diagrams
PPT
Software Engineering Lec 7-uml-
PPT
Lecture11 use case sequence diagram
PPT
07 interaction diagrams
PPT
lecture09-sequencediagrams notes and leac
PPT
lecture09-sequencediagrams for unfied modelling language
PPT
OOAD-Unit-3.ppt UML and ANALYSISI AND DESIGN
PPTX
08.Sequence Diagrams.pptx in cS to describe
SAD11 - Sequence Diagrams
Software Engineering Lec 7-uml-
Lecture11 use case sequence diagram
07 interaction diagrams
lecture09-sequencediagrams notes and leac
lecture09-sequencediagrams for unfied modelling language
OOAD-Unit-3.ppt UML and ANALYSISI AND DESIGN
08.Sequence Diagrams.pptx in cS to describe

Similar to Sequence diagrams & communication diagrams (20)

PPTX
The Ultimate Sequence Diagram Tutorial
PPT
Ooad sequence diagram lecture
PPT
OOADPPT Lecture 5 The OOAD Presentation.pptx
PPTX
Sequence diagram
PDF
Sequence diagrams
PPTX
Sequence Diagrams With Pictures (1).pptx
PPTX
Communication diagram Introduction
PPTX
SE - Lecture 6 - Software Design n Construction.pptx
PPT
Fundamentals of Software Engineering
PPTX
Lecture 17 -18 - Sequence Diagram - Class Diagram.pptx
PPT
ملخص تحليل الانظمة وتصميمها - الوحدة السادسة
PPT
M03 2 Behavioral Diagrams
PPT
Slide 4 Interaction Diagram
PPTX
Data Flow Diagram and Sequence Diagram
PDF
A novel methodology for test scenario generation based on control flow analys...
PPT
Sequence diagrams
PPT
Pertemuan 6-2-sequence-diagram
PPTX
An introduction to uml
PPT
Cs8592 ooad unit 3
PPT
Cs8592 ooad unit 3
The Ultimate Sequence Diagram Tutorial
Ooad sequence diagram lecture
OOADPPT Lecture 5 The OOAD Presentation.pptx
Sequence diagram
Sequence diagrams
Sequence Diagrams With Pictures (1).pptx
Communication diagram Introduction
SE - Lecture 6 - Software Design n Construction.pptx
Fundamentals of Software Engineering
Lecture 17 -18 - Sequence Diagram - Class Diagram.pptx
ملخص تحليل الانظمة وتصميمها - الوحدة السادسة
M03 2 Behavioral Diagrams
Slide 4 Interaction Diagram
Data Flow Diagram and Sequence Diagram
A novel methodology for test scenario generation based on control flow analys...
Sequence diagrams
Pertemuan 6-2-sequence-diagram
An introduction to uml
Cs8592 ooad unit 3
Cs8592 ooad unit 3
Ad

More from Naga Muruga (20)

PDF
Naga Muruga (1.6 Years) Developer Resume
PDF
CHAITANYA UNIVERSITY - BEST POSTER.pdf
PDF
AMET - BEST PRESENTATION.pdf
PDF
Intro to Git
PDF
DEvOpS, CI/CD For Beginners.pdf
PDF
API and Web Service Introduction .pdf
PDF
Naga muruga resume
PPTX
Self Healing Materials - A Review
PDF
Fundamentals of Manuscript Preparation
PDF
Auto CAD (Beginner)
PDF
Content Writing
PDF
Boilers, Types and Energy Efficiency
PDF
Project Management Essentials
PDF
Lean Six Sigma White Belt
PDF
Basics of Drives and Motors
PDF
Supply Chain
PPTX
Green walls
PPTX
Anti juice jacking smart solar charger
PDF
Top 32 technologies
PDF
Controversy on feminism
Naga Muruga (1.6 Years) Developer Resume
CHAITANYA UNIVERSITY - BEST POSTER.pdf
AMET - BEST PRESENTATION.pdf
Intro to Git
DEvOpS, CI/CD For Beginners.pdf
API and Web Service Introduction .pdf
Naga muruga resume
Self Healing Materials - A Review
Fundamentals of Manuscript Preparation
Auto CAD (Beginner)
Content Writing
Boilers, Types and Energy Efficiency
Project Management Essentials
Lean Six Sigma White Belt
Basics of Drives and Motors
Supply Chain
Green walls
Anti juice jacking smart solar charger
Top 32 technologies
Controversy on feminism
Ad

Recently uploaded (20)

PPTX
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
PDF
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
PPTX
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...
PPTX
Information Storage and Retrieval Techniques Unit III
PPTX
Software Engineering and software moduleing
PDF
737-MAX_SRG.pdf student reference guides
PDF
Categorization of Factors Affecting Classification Algorithms Selection
PPTX
AUTOMOTIVE ENGINE MANAGEMENT (MECHATRONICS).pptx
PDF
distributed database system" (DDBS) is often used to refer to both the distri...
PPTX
introduction to high performance computing
PDF
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
PDF
UNIT no 1 INTRODUCTION TO DBMS NOTES.pdf
PPTX
"Array and Linked List in Data Structures with Types, Operations, Implementat...
PDF
Soil Improvement Techniques Note - Rabbi
PPT
Total quality management ppt for engineering students
PPTX
tack Data Structure with Array and Linked List Implementation, Push and Pop O...
PPTX
CyberSecurity Mobile and Wireless Devices
PDF
ChapteR012372321DFGDSFGDFGDFSGDFGDFGDFGSDFGDFGFD
PDF
Exploratory_Data_Analysis_Fundamentals.pdf
PDF
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...
Information Storage and Retrieval Techniques Unit III
Software Engineering and software moduleing
737-MAX_SRG.pdf student reference guides
Categorization of Factors Affecting Classification Algorithms Selection
AUTOMOTIVE ENGINE MANAGEMENT (MECHATRONICS).pptx
distributed database system" (DDBS) is often used to refer to both the distri...
introduction to high performance computing
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
UNIT no 1 INTRODUCTION TO DBMS NOTES.pdf
"Array and Linked List in Data Structures with Types, Operations, Implementat...
Soil Improvement Techniques Note - Rabbi
Total quality management ppt for engineering students
tack Data Structure with Array and Linked List Implementation, Push and Pop O...
CyberSecurity Mobile and Wireless Devices
ChapteR012372321DFGDSFGDFGDFSGDFGDFGDFGSDFGDFGFD
Exploratory_Data_Analysis_Fundamentals.pdf
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...

Sequence diagrams & communication diagrams

  • 1. SEQUENCE DIAGRAMS & COMMUNICATION DIAGRAMS By, D. B. Naga Muruga, Dept of Mechanical Engineering Sriram Engineering College
  • 2. Class and Object Diagrams UML structure diagrams
  • 3. Interaction Diagrams • Describe how objects collaborate to achieve some behavior
  • 4. Consider a use case • We have an order • We are going to calculate its price • Order needs to look at all its line items – determine price of line item based on the pricing rules of its product
  • 6. Another sequence diagram of the use case
  • 7. Creating and deleting participants
  • 8. Interaction Frames • Sequence diagrams are not suitable for showing complex control flow • Instead use – pseudocode – activity diagrams • Use interaction frames to describe simple control logic
  • 12. Control logic in UML 1 • Iteration marker (*) on message – iteration basis given in “[]” • Guards – message conditions in “[]” • Problem: only works on a single message – Solution: use self-call by a pseudo message to show scope
  • 14. Synchronous and Asynchronous messages • Synchronous – The sender object must wait for the receiver object to finish – symbol UML 2 UML <1.4 • Asynchronous – The sender object can carry on without waiting – symbol UML 2 UML <1.4
  • 15. Communication Diagrams • Focus on the data links between objects • Communication diagrams are graphs – Nodes: Objects – Edges: Association and transient links messages are arrows on links • Communication sequence given by numbering scheme
  • 18. Other conventions • You can show several computations in one diagram – 1.1, 1.2.1, 1.2.2, 1.3, … – 2.1, 2.2, 2.3.1, 2.3.2,… • You can use letters to indicate different threads – A1.1, A1.2.1, A1.2.2,… – B1.1, B1.2.1, B1.2.2,… • You can use iteration markers “*” and guards [] to show control logic, but no complete constructs
  • 19. • A matter of personal taste • Sequence diagrams better when you want to emphasize sequence of calls • Communication diagrams better when you want to emphasize links How to choose between sequence and communication diagrams
  • 20. Dog Fun • Each customer has one or more dogs • I keep track of the customers’ kind of dogs and email so I can send them greetings at Christmas and new offers [if they want]. I also keep track of how much they have spent • The system helps me compute how much the customer should pay for the treatments of the dogs the customer brings • A treatment starts with a wash that has a fixed cost of 10$ no matter what kind of dog • Then there are three kinds of ways to continue a treatment: 1. puddle-cut which can be NY-style to $100 or London to $50 (London style may include coloring for an extra $10) [I decline to puddle cut a dog that’s not a puddle] 2. trim-cut for $30, or 3. style-cut for $40 • Some of my costumers get a discount of some percent, but not all
  • 21. Alice visits Dog Fun to have her dog in for a NY-style cut. Show how the visits collection of Alice is updated.