SlideShare a Scribd company logo
1 of 17
Object Oriented Analysis &
Design
Sequence Diagram and collaboration diagram
Instructor: Ms farwa taimoor
Use Cases
Captures system functionality as seen by users
Use Case Diagram
• Captures system functionality as seen by users
• Built in early stages of development
• Purpose
▫ Specify the context of a system
▫ Capture the requirements of a system
▫ Validate a system’s architecture
▫ Drive implementation and generate test cases
• Developed by analysts and domain experts
Sequence Diagram
• Captures dynamic behavior (time-oriented)
Sequence Diagram
• Captures dynamic behavior (time-oriented)
• Purpose
▫ Model flow of control
▫ Illustrate typical scenarios
Sequence Diagrams
A sequence diagram shows an interaction
▫ arranged in time sequence
▫ the objects (not the classes)
▫ the messages that pass between them
when an interaction occurs
Sequence Diagram: Example
:Caller :Operator :Callee
time
call
ack
number
call
ack
talk
transfer
sequence
diagram
Sequence Diagram
• Objects are shown in rectangles on the top of the
diagrams
• Each rectangle contains
▫ Name (always underlined)
[objects are underlined not class]
objectName:className
Sequence Diagram
objectName:className
•Below each object rectangle,
shown with a dotted line, is the
LIFELINE, of that object.
•A time-ordered visual
framework for message
exchange between the objects
(and with the system)
Sequence Diagram
• A narrow vertical line
called the ACTIVATION
represents the period of
time an object is actually
performing an action
▫ Directly
▫ Or through an intermediary
(such as another object)
objectName:className
Sequence Diagram
• Messages appear
as arrows with a
text description
objectName:className
getID()
Message Types
• Simple Message
▫ Control is passed from one object to another without
providing details
• Synchronous Message
▫ The sending object pause to wait for a result
• Asynchronous Message
▫ The sending object does not pause to wait for the result
• Return Message
▫ This message indicates a return from a procedure call
Message Types
Asynchronous Message
Return Message
Synchronous Message
Simple Message
Collaboration Diagrams
Dynamic Behaviour
Collaboration Diagram
• The second interaction diagram is collaboration
diagram. It shows the object organization as shown
below. Here in collaboration diagram the method call
sequence is indicated by some numbering technique as
shown below. The number indicates how the methods
are called one after another. We have taken the same
order management system to describe the collaboration
diagram.
Collaboration Diagram(Cont..)
• The method calls are similar to that of a sequence
diagram. But the difference is that the sequence diagram
does not describe the object organization where as the
collaboration diagram shows the object organization.
• Now to choose between these two diagrams the main
emphasis is given on the type of requirement. If the time
sequence is important then sequence diagram is used
and if organization is required then collaboration
diagram is used.
Example

More Related Content

What's hot

4 activity diagrams
4 activity diagrams4 activity diagrams
4 activity diagramsMark Gaad
 
Active Object Design Pattern
Active Object Design PatternActive Object Design Pattern
Active Object Design Patternjeremiahdjordan
 
08 state diagram and activity diagram
08 state diagram and activity diagram08 state diagram and activity diagram
08 state diagram and activity diagramBaskarkncet
 
Activity Diagram
Activity DiagramActivity Diagram
Activity DiagramAshesh R
 
Object modeling techniques by savyasachi
Object modeling techniques by savyasachiObject modeling techniques by savyasachi
Object modeling techniques by savyasachiSavyasachi14
 
Data and functional modeling
Data and functional modelingData and functional modeling
Data and functional modelingSlideshare
 
Sequence diagram
Sequence diagramSequence diagram
Sequence diagramRahul Pola
 
Flowchart design for algorithms
Flowchart design for algorithmsFlowchart design for algorithms
Flowchart design for algorithmsKuppusamy P
 

What's hot (16)

4 activity diagrams
4 activity diagrams4 activity diagrams
4 activity diagrams
 
Activity diag
Activity diagActivity diag
Activity diag
 
Active Object Design Pattern
Active Object Design PatternActive Object Design Pattern
Active Object Design Pattern
 
Activity diagram
Activity diagramActivity diagram
Activity diagram
 
08 state diagram and activity diagram
08 state diagram and activity diagram08 state diagram and activity diagram
08 state diagram and activity diagram
 
Activity Diagram
Activity DiagramActivity Diagram
Activity Diagram
 
State chart diagram
State chart diagramState chart diagram
State chart diagram
 
Object modeling techniques by savyasachi
Object modeling techniques by savyasachiObject modeling techniques by savyasachi
Object modeling techniques by savyasachi
 
Activity diagram
Activity diagramActivity diagram
Activity diagram
 
Data and functional modeling
Data and functional modelingData and functional modeling
Data and functional modeling
 
Deep Feature Synthesis
Deep Feature SynthesisDeep Feature Synthesis
Deep Feature Synthesis
 
Chapter7
Chapter7Chapter7
Chapter7
 
Sequence diagram
Sequence diagramSequence diagram
Sequence diagram
 
Diagrams
DiagramsDiagrams
Diagrams
 
Matlab pt1
Matlab pt1Matlab pt1
Matlab pt1
 
Flowchart design for algorithms
Flowchart design for algorithmsFlowchart design for algorithms
Flowchart design for algorithms
 

Similar to Ooad sequence diagram_collaboration diagram

Lecture#03, uml diagrams
Lecture#03, uml diagramsLecture#03, uml diagrams
Lecture#03, uml diagramsbabak danyal
 
introofUML.pptx
introofUML.pptxintroofUML.pptx
introofUML.pptxRojaPogul1
 
Overview of UML Diagrams
Overview of UML DiagramsOverview of UML Diagrams
Overview of UML DiagramsManish Kumar
 
Cs 1023 lec 10 uml (week 3)
Cs 1023 lec 10 uml (week 3)Cs 1023 lec 10 uml (week 3)
Cs 1023 lec 10 uml (week 3)stanbridge
 
FSD MICRO PROJECT UML PPT.pptx
FSD MICRO PROJECT UML PPT.pptxFSD MICRO PROJECT UML PPT.pptx
FSD MICRO PROJECT UML PPT.pptxThorOdinson55
 
The Ultimate Sequence Diagram Tutorial
The Ultimate Sequence Diagram TutorialThe Ultimate Sequence Diagram Tutorial
The Ultimate Sequence Diagram TutorialCreately
 
Modeling software with UML
Modeling software with UMLModeling software with UML
Modeling software with UML6020 peaks
 
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
 
Slide 4 Interaction Diagram
Slide 4 Interaction DiagramSlide 4 Interaction Diagram
Slide 4 Interaction DiagramNiloy Rocker
 
lecture 3.ppt
lecture  3.pptlecture  3.ppt
lecture 3.pptTik Tok
 
Basic Behavioral Modeling
Basic Behavioral ModelingBasic Behavioral Modeling
Basic Behavioral ModelingAMITJain879
 
8.Unified Process Modelling.ppt of software engg
8.Unified Process Modelling.ppt  of software engg8.Unified Process Modelling.ppt  of software engg
8.Unified Process Modelling.ppt of software enggSukhmanSingh91
 

Similar to Ooad sequence diagram_collaboration diagram (20)

Cs8592 ooad unit 1
Cs8592 ooad unit 1Cs8592 ooad unit 1
Cs8592 ooad unit 1
 
Cs8592 ooad unit 1
Cs8592 ooad unit 1Cs8592 ooad unit 1
Cs8592 ooad unit 1
 
Class Diagrams
Class DiagramsClass Diagrams
Class Diagrams
 
Lecture#03, uml diagrams
Lecture#03, uml diagramsLecture#03, uml diagrams
Lecture#03, uml diagrams
 
introofUML.pptx
introofUML.pptxintroofUML.pptx
introofUML.pptx
 
CS8592-OOAD Lecture Notes Unit-3
CS8592-OOAD Lecture Notes Unit-3CS8592-OOAD Lecture Notes Unit-3
CS8592-OOAD Lecture Notes Unit-3
 
uml.ppt
uml.pptuml.ppt
uml.ppt
 
Overview of UML Diagrams
Overview of UML DiagramsOverview of UML Diagrams
Overview of UML Diagrams
 
Cs 1023 lec 10 uml (week 3)
Cs 1023 lec 10 uml (week 3)Cs 1023 lec 10 uml (week 3)
Cs 1023 lec 10 uml (week 3)
 
FSD MICRO PROJECT UML PPT.pptx
FSD MICRO PROJECT UML PPT.pptxFSD MICRO PROJECT UML PPT.pptx
FSD MICRO PROJECT UML PPT.pptx
 
The Ultimate Sequence Diagram Tutorial
The Ultimate Sequence Diagram TutorialThe Ultimate Sequence Diagram Tutorial
The Ultimate Sequence Diagram Tutorial
 
Analysis
AnalysisAnalysis
Analysis
 
Modeling software with UML
Modeling software with UMLModeling software with UML
Modeling software with UML
 
SE_Lec 09_ UML Behaviour Diagrams
SE_Lec 09_ UML Behaviour DiagramsSE_Lec 09_ UML Behaviour Diagrams
SE_Lec 09_ UML Behaviour Diagrams
 
Slide 4 Interaction Diagram
Slide 4 Interaction DiagramSlide 4 Interaction Diagram
Slide 4 Interaction Diagram
 
lecture 3.ppt
lecture  3.pptlecture  3.ppt
lecture 3.ppt
 
Basic Behavioral Modeling
Basic Behavioral ModelingBasic Behavioral Modeling
Basic Behavioral Modeling
 
8.Unified Process Modelling.ppt of software engg
8.Unified Process Modelling.ppt  of software engg8.Unified Process Modelling.ppt  of software engg
8.Unified Process Modelling.ppt of software engg
 
SMD Unit ii
SMD Unit iiSMD Unit ii
SMD Unit ii
 
OODIAGRAMS (4).ppt
OODIAGRAMS (4).pptOODIAGRAMS (4).ppt
OODIAGRAMS (4).ppt
 

Recently uploaded

Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxAnaBeatriceAblay2
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 

Recently uploaded (20)

Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 

Ooad sequence diagram_collaboration diagram

  • 1. Object Oriented Analysis & Design Sequence Diagram and collaboration diagram Instructor: Ms farwa taimoor
  • 2. Use Cases Captures system functionality as seen by users
  • 3. Use Case Diagram • Captures system functionality as seen by users • Built in early stages of development • Purpose ▫ Specify the context of a system ▫ Capture the requirements of a system ▫ Validate a system’s architecture ▫ Drive implementation and generate test cases • Developed by analysts and domain experts
  • 4. Sequence Diagram • Captures dynamic behavior (time-oriented)
  • 5. Sequence Diagram • Captures dynamic behavior (time-oriented) • Purpose ▫ Model flow of control ▫ Illustrate typical scenarios
  • 6. Sequence Diagrams A sequence diagram shows an interaction ▫ arranged in time sequence ▫ the objects (not the classes) ▫ the messages that pass between them when an interaction occurs
  • 7. Sequence Diagram: Example :Caller :Operator :Callee time call ack number call ack talk transfer sequence diagram
  • 8. Sequence Diagram • Objects are shown in rectangles on the top of the diagrams • Each rectangle contains ▫ Name (always underlined) [objects are underlined not class] objectName:className
  • 9. Sequence Diagram objectName:className •Below each object rectangle, shown with a dotted line, is the LIFELINE, of that object. •A time-ordered visual framework for message exchange between the objects (and with the system)
  • 10. Sequence Diagram • A narrow vertical line called the ACTIVATION represents the period of time an object is actually performing an action ▫ Directly ▫ Or through an intermediary (such as another object) objectName:className
  • 11. Sequence Diagram • Messages appear as arrows with a text description objectName:className getID()
  • 12. Message Types • Simple Message ▫ Control is passed from one object to another without providing details • Synchronous Message ▫ The sending object pause to wait for a result • Asynchronous Message ▫ The sending object does not pause to wait for the result • Return Message ▫ This message indicates a return from a procedure call
  • 13. Message Types Asynchronous Message Return Message Synchronous Message Simple Message
  • 15. Collaboration Diagram • The second interaction diagram is collaboration diagram. It shows the object organization as shown below. Here in collaboration diagram the method call sequence is indicated by some numbering technique as shown below. The number indicates how the methods are called one after another. We have taken the same order management system to describe the collaboration diagram.
  • 16. Collaboration Diagram(Cont..) • The method calls are similar to that of a sequence diagram. But the difference is that the sequence diagram does not describe the object organization where as the collaboration diagram shows the object organization. • Now to choose between these two diagrams the main emphasis is given on the type of requirement. If the time sequence is important then sequence diagram is used and if organization is required then collaboration diagram is used.