ScholarQuill logoScholarQuillUniversity Notes
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
Study Tools
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
Contact
ScholarQuill logo
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
ScholarQuill logoScholarQuillUniversity Notes
Study PortalCOMP3150Interaction Diagrams
Ctrl + K
Login
Explore
Search
Semester
Papers
CGPA
    COMP3150

    Object Oriented Analysis and Design

    Progress0 / 17 done
    Topics17
    1Principles of Object Technology2OOP Review3Principles of Modeling4OOA&D Overview5OO Development Process
    6Use Cases and Prototyping7Class Models8Interaction Diagrams9Verification and Validation10Architectural and Detailed Design11Class Diagrams12State Machines and Diagrams13Implementation and Package Diagrams14Activity Diagrams15OO Patterns16Object Diagram, Component Diagram, and Deployment Diagram17Network Diagram
    3 min read
    Topic 8 of 17
    Topic Study Note Illustration
    08

    Interaction Diagrams

    Interaction Diagrams are UML diagrams that show how objects communicate with each other by sending messages to perform a task.

    πŸ“˜ Interaction Diagrams (OOAD)


    πŸ”Ή 1. Definition

    Interaction Diagrams are UML diagrams that show how objects communicate with each other by sending messages to perform a task.

    πŸ‘‰ Simple idea: They describe how the system behaves (dynamic view) β€” who talks to whom and in what order.


    πŸ”Ή 2. Purpose of Interaction Diagrams

    • Show object collaboration
    • Describe flow of messages
    • Help understand system behavior
    • Validate system design

    πŸ”Ή 3. Types of Interaction Diagrams ⭐

    There are mainly two important types:


    πŸ”Έ 3.1 Sequence Diagram

    Sequence diagram
    Visual ReferenceSequence
    Wikipedia

    βœ… Definition:

    A Sequence Diagram shows how objects interact in a time sequence (step-by-step order).


    πŸ”Ή Key Elements:

    Element Description
    Object Participant in interaction
    Lifeline Vertical dashed line showing object life
    Message Communication between objects
    Activation Time an object is active

    πŸ”Ή Diagram Description:

    • Objects are placed horizontally
    • Time flows top to bottom
    • Arrows show messages
    User β†’ Login System β†’ Database
    

    πŸ”Ή Example: ATM System

    1. User inserts card
    2. System asks for PIN
    3. User enters PIN
    4. System verifies
    5. Cash is dispensed

    πŸ”Ή Types of Messages:

    • Synchronous (wait for response)
    • Asynchronous (no wait)
    • Return message

    πŸ”Έ 3.2 Communication Diagram (Collaboration Diagram)

    βœ… Definition:

    A Communication Diagram shows interaction between objects focusing on relationships rather than time.


    πŸ”Ή Key Elements:

    Element Description
    Objects Connected with links
    Messages Labeled arrows
    Sequence Numbers Show order of messages

    πŸ”Ή Diagram Description:

    • Objects are connected like a network
    • Messages are numbered (1, 2, 3…)
    1: request()
    2: process()
    3: response()
    

    πŸ”Ή 4. Sequence vs Communication Diagram

    Feature Sequence Diagram Communication Diagram
    Focus Time sequence Object relationships
    Layout Vertical Network-like
    Message Order Top β†’ Bottom Numbered

    πŸ”Ή 5. Steps to Create Interaction Diagrams


    πŸ”Ή Step 1: Identify Scenario

    • Choose a use case

    πŸ”Ή Step 2: Identify Objects

    • List participating objects

    πŸ”Ή Step 3: Determine Messages

    • Define communication steps

    πŸ”Ή Step 4: Arrange Order

    • Show sequence or numbering

    πŸ”Ή Step 5: Draw Diagram

    • Use UML notation

    πŸ”Ή 6. Example (Library System)


    πŸ”Ή Scenario: Borrow Book


    πŸ”Ή Sequence Diagram:

    Member β†’ Librarian β†’ Book
    

    Steps:

    1. Member requests book
    2. Librarian checks availability
    3. Book is issued

    πŸ”Ή Communication Diagram:

    1: requestBook()
    2: checkAvailability()
    3: issueBook()
    

    πŸ”Ή 7. Advantages of Interaction Diagrams

    • Clear understanding of system flow
    • Helps in debugging design
    • Improves communication
    • Shows real-time interactions

    πŸ”Ή 8. Important Rules / Guidelines

    • Keep diagrams simple and clear
    • Use meaningful object names
    • Show correct message order
    • Avoid unnecessary complexity

    πŸ”Ή 9. Likely Exam Questions

    1. Define interaction diagram.
    2. Explain sequence diagram with example.
    3. What is a communication diagram?
    4. Difference between sequence and communication diagrams.
    5. Explain elements of sequence diagram.
    6. Describe types of messages.
    7. Steps to create interaction diagrams.
    8. Draw sequence diagram for ATM system.
    9. Advantages of interaction diagrams.
    10. Role of interaction diagrams in OOAD.

    πŸ”Ή 10. Quick Revision Summary 🧠

    • Interaction Diagrams = Object communication

    • Types:

      • Sequence Diagram β†’ Time-based
      • Communication Diagram β†’ Relationship-based

    πŸ‘‰ Key Points:

    • Objects send messages
    • Show dynamic behavior

    πŸ‘‰ Trick to Remember: "SC β†’ Sequence & Communication"


    ← Previous topic 7
    Class Models
    Next topic 9 β†’
    Verification and Validation

    Past Papers

    Open this section to view and download past papers

    Click on Show Past Papers to load available exam papers.

    Reading Progress
    0%
    3mremaining
    486words
    Beginnerlevel
    On This Page

    No headings found

    Study Toolkit

    Subject Portal

    Object Oriented Analysis and Design