ScholarQuill logoScholarQuillUniversity Notes
  • Notes
  • Past Papers
  • Blogs
  • Todo
Login
ScholarQuill logoScholarQuillUniversity Notes
Login
NotesPast PapersBlogsTodo
More
SubjectsDiscussionCGPA CalculatorGPA CalculatorStudent PortalCourse Outline
About
About usPrivacy PolicyReportContact
Notes
Past Papers
Blogs
Todo
Analytics
    Current Subject
    🧩
    Object Oriented Analysis and Design
    COMP3150
    Progress0 / 17 topics
    Topics
    1. Principles of Object Technology2. OOP Review3. Principles of Modeling4. OOA&D Overview5. OO Development Process6. Requirements Engineering: Use Cases and Prototyping7. Class Models8. Interaction Diagrams9. Verification and Validation10. Architectural and Detailed Design11. Class Diagrams12. State Machines and Diagrams13. Implementation and Package Diagrams14. Activity Diagrams15. OO Patterns16. Object Diagram, Component Diagram, and Deployment Diagram17. Network Diagram
    COMP3150›Interaction Diagrams
    Object Oriented Analysis and DesignTopic 8 of 17

    Interaction Diagrams

    3 minread
    482words
    Beginnerlevel

    📘 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

    ✅ 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 load past papers

    Click on Show Past Papers to see past papers.
    On This Page
      Reading Stats
      Est. reading time3 min
      Word count482
      Code examples0
      DifficultyBeginner