Lab Report # 5
Submitted By:
        Name: Nishal Karki
        Roll no: 211321
   Faculty: Science and Technology
          Semester: Sixth
          Submitted To:
    Instructor : Er. Manil Vaidhya
DEPARTMENT OF COMPUTER ENGINEERING
    Submission Date: 2081-09-18
Introduction to Sequence Diagram
A sequence diagram is a type of interaction diagram in Unified Modeling Language
(UML) that visually represents how objects in a system interact over time. It shows
the flow of messages between various objects, processes, or components,
arranged in a time-ordered sequence.
Objectives
   1.   To represent the sequence of events in a process or interaction.
   2.   To visualize how components communicate and collaborate in a system.
   3.   To analyze and design the logic of complex systems or workflows.
   4.   To identify bottlenecks or inefficiencies in the interaction flow.
Key Components of a Sequence Diagram
   1. Actors:
         a. Represent external entities (e.g., users or external systems) that
            interact with the system.
   2. Objects or Classes:
        a. Represent components or entities within the system that are part of
            the interaction.
   3. Lifelines:
          a. Vertical dashed lines below each object or actor to represent
             their lifetime during the interaction.
   4. Messages:
        a. Arrows that indicate communication or interaction between objects.
        b. Synchronous Messages: Represent a call that requires a response.
        c. Asynchronous Messages: Represent communication without
           requiring a response.
  5. Activation Bars:
        a. Thin rectangles on the lifeline showing the period an object is active.
  6. Loops and Conditions:
       a. Represent repeating actions or decision points in the interaction.
Advantages of Sequence Diagrams
  1. Clarity: Provides a clear and easy-to-follow representation of the order and
     flow of interactions in a system.
  2. Error Detection: Helps identify potential design flaws, bottlenecks, or
     missing interactions in the system.
  3. Collaboration: Facilitates communication among team members by offering
     a common visual language.
  4. Documentation: Acts as a reference for developers and stakeholders
     during development and maintenance.
  5. Scalability: Can model simple to complex processes, from small interactions
     to large systems.
Figure: Sequence diagram