Software Engineering Assignment 8
Software Engineering Assignment 8
:-8
To develop a Railway Reservation System that allows users to book, cancel, and
manage train reservations, enabling efficient and user-friendly railway service
management
Actors:
• Passenger
• Booking Agent
• Admin
• Train System
Use Cases:
• Passenger:
o Search Trains
o Book Ticket
o Cancel Booking
o View Booking History
o Modify Booking
• Booking Agent:
o Assist Booking
o Cancel Booking
o Modify Booking
o View Booking History
• Admin:
o Manage Train Schedules
o Manage Train Details
o Generate Reports
o Manage Users
• Train System:
o Validate Ticket
o Update Train Status
o Notify System of Changes
sql
Copy code
+------------------------------------+
| Railway Reservation System |
| |
| +-----------------+ +----------+|
| | Passenger | | Booking | |
| +-----------------+ | Agent | |
| | | +----------+ |
| | + Search Trains | | + Assist | |
| | + Book Ticket | | Booking | |
| | + Cancel Booking| | + Cancel | |
| | + View History | | Booking | |
| | + Modify Booking| | + Modify | |
| | | | Booking | |
| +-----------------+ | + View | |
| | History | |
| +-----------------+ +----------+ |
| | Admin | |
| +-----------------+ |
| | | |
| | + Manage Train | |
| | Schedules | |
| | + Manage Train | |
| | Details | |
| | + Generate | |
| | Reports | |
| | + Manage Users | |
| +-----------------+ |
| |
| +-----------------+ |
| | Train System | |
| +-----------------+ |
| | | |
| | + Validate Ticket| |
| | + Update Train | |
| | Status | |
| | + Notify System | |
| | of Changes | |
| +-----------------+ |
+------------------------------------+
2. Class Diagram
Classes:
• Passenger
o Attributes: passengerID, name, email, phone
o Methods: searchTrains(), bookTicket(), cancelBooking(), viewBookingHistory(),
modifyBooking()
• Booking Agent
o Attributes: agentID, name, email
o Methods: assistBooking(), cancelBooking(), modifyBooking(), viewBookingHistory()
• Admin
o Attributes: adminID, name, email
o Methods: manageTrainSchedules(), manageTrainDetails(), generateReports(), manageUsers()
• Train
o Attributes: trainID, trainNumber, route, schedule, seatsAvailable
o Methods: updateStatus(), getTrainDetails()
• Booking
o Attributes: bookingID, passengerID, trainID, bookingDate, status
o Methods: createBooking(), cancelBooking(), modifyBooking()
• Schedule
o Attributes: scheduleID, trainID, departureTime, arrivalTime, source, destination
o Methods: updateSchedule()
• Ticket
o Attributes: ticketID, bookingID, seatNumber, issueDate
o Methods: validateTicket()
Class Diagram:
scss
Copy code
+------------------+
| Passenger |
+------------------+
| - passengerID |
| - name |
| - email |
| - phone |
+------------------+
| + searchTrains() |
| + bookTicket() |
| + cancelBooking()|
| + viewBookingHistory() |
| + modifyBooking() |
+------------------+
|
|
v
+------------------+
| Booking |
+------------------+
| - bookingID |
| - passengerID |
| - trainID |
| - bookingDate |
| - status |
+------------------+
| + createBooking()|
| + cancelBooking()|
| + modifyBooking()|
+------------------+
|
|
v
+------------------+
| Train |
+------------------+
| - trainID |
| - trainNumber |
| - route |
| - schedule |
| - seatsAvailable |
+------------------+
| + updateStatus() |
| + getTrainDetails() |
+------------------+
|
|
v
+------------------+
| Schedule |
+------------------+
| - scheduleID |
| - trainID |
| - departureTime |
| - arrivalTime |
| - source |
| - destination |
+------------------+
| + updateSchedule() |
+------------------+
|
|
v
+------------------+
| Ticket |
+------------------+
| - ticketID |
| - bookingID |
| - seatNumber |
| - issueDate |
+------------------+
| + validateTicket() |
+------------------+
|
|
v
+------------------+
| Booking Agent |
+------------------+
| - agentID |
| - name |
| - email |
+------------------+
| + assistBooking()|
| + cancelBooking()|
| + modifyBooking()|
| + viewBookingHistory() |
+------------------+
|
|
v
+------------------+
| Admin |
+------------------+
| - adminID |
| - name |
| - email |
+------------------+
| + manageTrainSchedules() |
| + manageTrainDetails() |
| + generateReports() |
| + manageUsers() |
+------------------+
3. Activity Diagram
sql
Copy code
+--------------------+
| Start |
+--------------------+
|
v
+--------------------+
| Search Trains |
+--------------------+
|
v
+--------------------+
| Select Train and |
| Enter Details |
+--------------------+
|
v
+--------------------+
| Check Seat |
| Availability |
+--------------------+
|
v
+--------------------+
| Confirm Booking |
+--------------------+
|
v
+--------------------+
| Payment Process |
+--------------------+
|
v
+--------------------+
| Generate Ticket |
+--------------------+
|
v
+--------------------+
| End |
+--------------------+
4. Sequence Diagram
scss
Copy code
Passenger System Train Booking
| | | |
| SearchTrains()| | |
|-------------->| | |
| | RetrieveTrainDetails() |
| |------------>| |
| | | |
| | | TrainDetails() |
| |<------------| |
| | | |
| SelectTrain() | | |
|-------------->| | |
| | | |
| | CheckAvailability() |
| |------------>| |
| | | Availability() |
| |<------------| |
| | | |
| ConfirmBooking() | | |
|-------------->| | |
| | | |
| | CreateBooking() | |
| |------------>| |
| | | |
| | | BookingCreated() |
| |<------------| |
| | | |
| GenerateTicket() | | |
|-------------->| | |
| | | |
| | GenerateTicket() | |
| |------------>| |
| | | TicketGenerated() |
| |<------------| |
| | | |
5. Component Diagram
Components:
• User Interface (UI)
o Handles user interactions, booking forms, and ticket generation
• Application Server
o Business logic for booking, cancellations, and updates
• Train Management Service
o Manages train schedules, seat availability, and status updates
• Database
o Stores passenger details, bookings, train schedules, and tickets
Component Diagram:
sql
Copy code
+------------------+ +-------------------+ +-----------------+
| User Interface |----->| Application Server|----->| Train |
| | | | | Management |
| | | | | Service |
+------------------+ +-------------------+ +-----------------+
|
v
+-----------------------+
| Database |
+-----------------------+
6. Deployment Diagram
Nodes:
• Client Machine
o Hosts the User Interface
• Application Server
o Hosts the Application Server and Train Management Service
• Database Server
o Hosts the Database
Deployment Diagram:
sql
Copy code
+-----------------+ +---------------------+
| Client Machine | | Application Server |
| | | |
| +-------------+ | | +-----------------+ |
| | User | | | | Application | |
| | Interface | | | | Server | |
| +-------------+ | | +-----------------+ |
+-----------------+ | +-----------------+ |
| | Train Management|
| | Service |
| +-----------------+ |
|
v
+---------------------+
| Database Server |
| |
| +-----------------+ |
| | Database | |
| +-----------------+ |
+---------------------+
These diagrams provide a detailed view of the Railway Reservation System, capturing user interactions,
system components, and deployment strategies. They help in understanding how the system works and how
different parts interact with each other.