0% found this document useful (0 votes)
40 views4 pages

UML Diagrams for Ticket Booking System

The document outlines the aim of finding interactions between objects using UML Sequence and Communication diagrams. It explains the purpose and structure of both types of interaction diagrams, detailing how they model control flow and object relationships. An example scenario of an Online Ticket Booking System illustrates the step-by-step processes represented in both sequence and collaboration diagrams.

Uploaded by

Sai Bunny
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views4 pages

UML Diagrams for Ticket Booking System

The document outlines the aim of finding interactions between objects using UML Sequence and Communication diagrams. It explains the purpose and structure of both types of interaction diagrams, detailing how they model control flow and object relationships. An example scenario of an Online Ticket Booking System illustrates the step-by-step processes represented in both sequence and collaboration diagrams.

Uploaded by

Sai Bunny
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Task 5

Aim: The aim is to find the interaction between objects and represent them
using UML Sequence & Communication diagrams.

Interaction Diagrams
Interaction diagrams depict interactions of objects and their relationships. They
also include the messages passed between them. There are two types of
interaction diagrams:
• Sequence Diagram
• Collaboration (Communication) Diagram
Interaction diagrams are used for modeling:
• The control flow by time ordering using sequence diagrams.
• The control flow of organization using collaboration diagrams.

Sequence Diagram
A sequence diagram is a type of interaction diagram because it describes
how—and in what order—a group of objects works together. It shows, as
parallel vertical lines (lifelines), different processes or objects that live
simultaneously, and as horizontal arrows, the messages exchanged between
them in the order in which they occur.
Drawing a sequence diagram helps to:
• Represent the details of a UML use case.
• Model the logic of a sophisticated procedure, function, or operation.
• See how objects and components interact with each other to complete a
process.
• Plan and understand the detailed functionality of an existing or future
scenario.
Notations:
1. Object
2. Actor
3. Lifeline
In the Online Ticket Booking System, the process of a user booking a ticket
can be outlined as follows:
1. The user logs into the ticket booking system.
2. The system verifies the credentials with the database.
3. The user searches for available tickets (e.g., movie, train, flight,
concert).
4. The system fetches available tickets from the database.
5. The user selects a ticket and proceeds to payment.
6. The system processes the payment and updates the database.
7. A confirmation is sent to the user with booking details.
This sequence diagram illustrates the step-by-step process of how a user
interacts with the Online Ticket Booking System to book a ticket.
Collaboration Diagram (Communication Diagram)
A collaboration diagram is used to show the relationship between the objects
in a system. Both sequence and collaboration diagrams represent the same
information but in different ways:
• Instead of showing the flow of messages, it depicts the architecture of
the object residing in the system.
• It is based on object-oriented programming.
Notations:
• Rectangles represent objects that make up the application.
• Lines between class instances represent the relationships between
different parts of the application.
• Arrows represent the messages that are sent between objects.
• Numbering lets you know in what order the messages are sent and how
many messages are required to finish a process.

Example Scenario: Ticket Booking


In a communication diagram for the Online Ticket Booking System:
1. The User requests to book a ticket.
2. The Booking System checks ticket availability and communicates with
the Database.
3. If tickets are available, the Booking System requests payment from the
user.
4. The User provides payment details.
5. The Booking System processes the payment and updates the database.
6. The Booking System sends a booking confirmation to the User.
This communication diagram illustrates the exchange of information and
interactions between the various components of the Online Ticket Booking
System during the ticket booking process.
Result:
Thus, the interaction between objects and the UML Sequence &
Communication diagrams for the Online Ticket Booking System have been
designed.

You might also like