0% found this document useful (0 votes)
31 views5 pages

UML Class & Object Diagrams for Booking Systems

The document outlines Experiment No. 4 for BTCOL506, focusing on designing Class and Object Diagrams for Online Movie Booking and Online Train Reservation Systems using UML. It details objectives, theoretical concepts, identified classes, their attributes, methods, and relationships, along with example scenarios for both systems. The experiment aims to enhance understanding of UML structural modeling and the interaction between static and dynamic views of software systems.

Uploaded by

lemik22238
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)
31 views5 pages

UML Class & Object Diagrams for Booking Systems

The document outlines Experiment No. 4 for BTCOL506, focusing on designing Class and Object Diagrams for Online Movie Booking and Online Train Reservation Systems using UML. It details objectives, theoretical concepts, identified classes, their attributes, methods, and relationships, along with example scenarios for both systems. The experiment aims to enhance understanding of UML structural modeling and the interaction between static and dynamic views of software systems.

Uploaded by

lemik22238
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

BTCOL506 – Software Engineering Laboratory

Experiment No. 4: Draw the Class Diagram and Object Diagram for Online
Movie Booking System & Online Train Reservation System
Title
To design and draw the Class Diagram and Object Diagram for Online Movie
Booking System and Online Train Reservation System using UML.

Objectives
- To understand the concepts of Class and Object Diagrams in UML.
- To identify the main classes, attributes, and relationships among objects.
- To represent the static structure and runtime instances of both systems.
- To establish the link between static and dynamic views of the system.

Theory / Concept
Unified Modeling Language (UML) includes structural diagrams that represent the
static view of a system. Two important structural diagrams are Class Diagram and
Object Diagram.

1. Class Diagram:
- Represents system structure by showing classes, their attributes, operations, and
relationships.
- Provides a blueprint for coding and database design.

2. Object Diagram:
- Represents a snapshot of system objects and their relationships at a specific
point in time.
- Useful for visualizing system state during runtime.

Purpose:
- To describe the structure and relationships among system entities.
- To visualize how system classes and objects interact.
- To aid in implementation and debugging of object-oriented software.

Case Study 1: Online Movie Booking System


The Online Movie Booking System allows users to browse available movies, select
seats, make payments, and receive e-tickets. Admin manages theaters, show timings,
and movie details.
Class Diagram Explanation
Identified Classes:
1. User
2. Admin
3. Movie
4. Theater
5. Show
6. Booking
7. Payment

Relationships:
- User makes multiple Bookings.
- Admin manages Movies and Shows.
- A Movie is played in multiple Theaters.
- Each Theater has multiple Shows.
- Each Booking is linked to one Payment.

Textual Representation of Class Diagram


Class: User
Attributes: userID, name, email, password
Methods: register(), login(), bookTicket()

Class: Movie
Attributes: movieID, title, genre, duration
Methods: displayInfo()

Class: Theater
Attributes: theaterID, name, location
Methods: showList()

Class: Show
Attributes: showID, time, availableSeats
Methods: updateSeats()

Class: Booking
Attributes: bookingID, seats, status
Methods: confirmBooking(), cancelBooking()

Class: Payment
Attributes: paymentID, amount, method, status
Methods: processPayment(), generateReceipt()

Object Diagram Explanation


Example Scenario:
- User ‘Riya’ books 2 tickets for 'Inception' at ‘PVR Theater’ for 6 PM show.

Objects:
User: Riya [userID=U1]
Movie: Inception [movieID=M1]
Theater: PVR [theaterID=T1]
Show: EveningShow [showID=S1, time=6PM]
Booking: B1 [seats=2, status=Confirmed]
Payment: P1 [amount=400, method=UPI, status=Success]

Case Study 2: Online Train Reservation System


The Online Train Reservation System enables passengers to search for trains, check
seat availability, book tickets, make payments, and get confirmation online. Admin
manages train schedules and route details.

Class Diagram Explanation


Identified Classes:
1. Passenger
2. Admin
3. Train
4. Route
5. Seat
6. Booking
7. Payment

Relationships:
- Passenger makes multiple Bookings.
- Admin manages Trains and Routes.
- Each Train follows a Route.
- Each Booking is linked to one Payment and one or more Seats.

Textual Representation of Class Diagram


Class: Passenger
Attributes: passengerID, name, email, contact
Methods: register(), login(), searchTrain(), bookTicket()

Class: Train
Attributes: trainID, trainName, type
Methods: getSchedule()

Class: Route
Attributes: routeID, source, destination, distance
Methods: getRouteInfo()

Class: Seat
Attributes: seatNo, classType, availability
Methods: checkAvailability()

Class: Booking
Attributes: bookingID, date, status
Methods: confirmBooking(), cancelBooking()

Class: Payment
Attributes: paymentID, amount, method, status
Methods: makePayment(), generateReceipt()

Object Diagram Explanation

Example Scenario:
- Passenger ‘Amit’ books a 2AC seat on Train ‘Rajdhani Express’ from Mumbai to
Delhi.

Objects:
Passenger: Amit [passengerID=P1]
Train: Rajdhani Express [trainID=T1]
Route: Mumbai–Delhi [routeID=R1]
Seat: 2AC-45 [seatNo=45, classType=2AC]
Booking: B1 [date=2025-11-05, status=Confirmed]
Payment: P1 [amount=2200, method=CreditCard, status=Success]

Steps to Draw the Diagrams

1. Identify main system entities and their relationships.


2. Determine attributes and methods of each class.
3. Draw the Class Diagram showing associations and multiplicities.
4. Create Object Diagram representing instances at a specific time.
5. Validate consistency between both diagrams.

Result
The Class and Object Diagrams for the Online Movie Booking System and Online
Train Reservation System were successfully drawn, showing classes, attributes,
methods, and relationships.

Conclusion
This experiment provided a detailed understanding of UML structural modeling.
Class and Object Diagrams are effective tools for representing the static design and
runtime object relationships of complex systems.

Draw the Class and Object Diagram for online Movie Booking
System and Online Train Reservation system??

You might also like