Online Ticket Reservation System
Online Ticket Reservation System
Online Ticket Reservation System
1. PROBLEM STATEMENT:
This project is about online ticket reservation and consists of two modules. The
reservation and the cancellation module. The reservation module allows the user to reserve
tickets for a particular train on a particular date. If there is a ticket available, the users can
know the vacancy details through the enquiry module. The cancellation module allows user
to cancel the tickets for a particular date through reservation officer (system). This module
performs status reveal before tickets are being reserved and after they get booked. All these
modules together prove to be a flexible online reservation system and it provides complete
flexibility to end users and it assumes the desired performance.
2. OVERALL DESCRIPTION:
2.1 MODULES:
Login
Display train list
Search for train
Reservation
Cancellation
Train Status
2.2 MODULE DELIVERABLES:
1. LOGIN
Basic Flow
This use case starts when the passenger wishes to Login to the Online Ticket Reservation
system
1. The System requests that the passenger enter his/her name and password
2. The passenger enters his/her name and password
3. The System validates the entered name and password and logs the passenger into the
System
Alternative Flows: Invalid Name/Password
If, in the Basic flow, the passenger enters an invalid name and/or password, the system
displays an error message. The passenger chooses to either return to the beginning of the
Basic flow or cancel the login, at which point the use case ends.
Pre-Conditions: None
Post-Conditions: If the use case was successful, the passenger is now logged into the system.
If not, the system State is unchanged.
2. Display Train List
Basic Flow: This use case gives passenger information about each train namely train no, train
name, Stations passes, Arrival Time, Departure Time etc
Alternative Flows: None
Pre-Conditions: None
Post-Conditions: If the use case was successful, the passenger information about each train
namely train no, train name, Stations passes, Arrival Time, Departure Time etc
3. Search for Train
Basic flow
The passenger can obtain train information either by entering train no or Source and
Destination Station
1. If the passenger train no gives the information about train
2. If the passenger enter Source and Destination Station from list gives information about list
of trains passing through station. From the list link will be provided to each train, which
contains the information
Alternate flow: If the passenger enters an invalid train no then it gives error message invalid
train no and asks the passenger to enter a valid train no.
Pre-Conditions: None
Post-Conditions: If the use case was successful, the passenger can able to view the list of
trains.
4.Reservation
Basic flow
1. The user reserves the ticket by giving following
a) Passenger name, Sex, Age, Address
b) Credit Card No, Bank Name
c) Class through passenger is going to travel i.e First class or Second class or AC
d) Train no and Train name, Date of Journey and number of tickets to be booked.
2. If the ticket is available in a train then the ticket will be issued with PNR No.else the ticket
will be issued with a waiting list number.
Alternative flow: If the passenger gives an invalid credit card no or specified a bank where
does have any account. Error message will be displayed.
Pre-Conditions: The passenger has to decide about the train he is going to travel.
Post-Conditions: If the use case was successful, the passenger will get the ticket.
5. Cancellation
Basic flow
This use case used by passenger to cancel the ticket, which he/she booked earlier by Entering
PNR No. The cancellation has been done reallocating the tickets allotted to the Passenger.
Alternate flow: If the Passenger had entered invalid PNR No then has been asked to enter
valid PNR No.
Pre-Conditions: The Passenger had reserved tickets in a train.
Post-Conditions: If the use case was successful, the passenger can cancel the ticket.
6. Ticket Status
Basic flow
1. The passenger should give PNR No to know the status of ticket, which he/she booked
earlier.
2. If the PNR No is valid, the status of the ticket will be displayed.
Alternate flow: If passenger had entered an invalid no or PNR NO, which does not exists then
error Message will be displayed.
Pre-Conditions: The Passenger had reserved tickets in a train.
Post-Conditions: If the use case was successful, the passenger can view status of the ticket.
3. UML DIAGRAMS:
3.1. Usecase Diagram:
list of trains
(from use case) confirm reservation
system controller
(from actor) (from actor) (from use case)
personal details
(from use case)
enter train details
(from use case)
submit
logout (from use case)
passenger
name : string
no : integer
login()
logout()
submit()
cancel()
input train details()
3.3 Activity Diagram:
start
log in
reservation cancellation
enter user
details enter cancellation
details
check
availabilit y confirm
cancellation
confirm recheck
availability
logout
end
system
passenger
controller
4. DATABASE DESIGN
Database name: Rail
Table name :student name
Field name Datatype
Name Text(50)
Place Integer
Mobile number integer
Coding:
Private Sub Command1_Click()
Form1.Show
Data1.Recordset.AddNew
Data1.Recordset.Fields("name") = Text1.Text
Data1.Recordset.Fields("place") = Text2.Text
Data1.Recordset.Fields("mobile number") = Text3.Text
Data1.Recordset.Update
End Sub
coding
Private Sub Command1_Click()
Form4.Show
Data1.Recordset.AddNew
Data1.Recordset.Fields("name") = Text1.Text
Data1.Recordset.Fields("age") = Text2.Text
Data1.Recordset.Fields("place") = Text3.Text
Data1.Recordset.Fields("train name and number") = Text8.Text
If Option1.Value = True Then
Data1.Recordset.Fields("seat selection") = "upper"
Else
Data1.Recordset.Fields("seat selection") = "lower"
End If
If Option6.Value = True Then
Data1.Recordset.Fields("sex") = "male"
Else
Data1.Recordset.Fields("sex") = "femal"
End If
If Option10.Value = True Then
Data1.Recordset.Fields("food") = "veg"
Else
Data1.Recordset.Fields("food") = "non-veg"
End If
If Option3.Value = True Then
Data1.Recordset.Fields("class") = "1 class"
Else
Data1.Recordset.Fields("seat selection") = "2 class"
End If
Data1.Recordset.Fields("date") = Text4.Text
Data1.Recordset.Fields("time") = Text5.Text
Data1.Recordset.Fields("from") = Text6.Text
Data1.Recordset.Fields("to") = Text7.Text
Data1.Recordset.Update
End Sub
coding
Private Sub Command2_Click()
Form5.Show
Data1.Recordset.AddNew
Data1.Recordset.Fields("adhar no") = Text1.Text
Data1.Recordset.Fields("pan card number") = Text2.Text
Data1.Recordset.Fields("e-mail ID") = Text3.Text
Data1.Recordset.Fields("mobile number") = Text4.Text
Data1.Recordset.Update
End Sub
coding
Private Sub Command1_Click()
train.Show
End Sub
coding
Private Sub Command1_Click()
Form4.Show
Data1.Recordset.AddNew
Data1.Recordset.Fields("name") = Text1.Text
Data1.Recordset.Fields("age") = Text2.Text
Data1.Recordset.Fields("place") = Text3.Text
Data1.Recordset.Fields("train name and number") = Text8.Text
If Option1.Value = True Then
Data1.Recordset.Fields("seat selection") = "upper"
Else
Data1.Recordset.Fields("seat selection") = "lower"
End If
If Option6.Value = True Then
Data1.Recordset.Fields("sex") = "male"
Else
Data1.Recordset.Fields("sex") = "femal"
End If
If Option10.Value = True Then
Data1.Recordset.Fields("food") = "veg"
Else
Data1.Recordset.Fields("food") = "non-veg"
End If
If Option3.Value = True Then
Data1.Recordset.Fields("class") = "1 class"
Else
Data1.Recordset.Fields("seat selection") = "2 class"
End If
Data1.Recordset.Fields("date") = Text4.Text
Data1.Recordset.Fields("time") = Text5.Text
Data1.Recordset.Fields("from") = Text6.Text
Data1.Recordset.Fields("to") = Text7.Text
Data1.Recordset.Update
End Sub
coding
Private Sub Command1_Click()
Form8.Show
End Sub
coding
Private Sub Command2_Click()
Form11.Show
Data1.Recordset.AddNew
Data1.Recordset.Fields("train name & number") = Text1.Text
Data1.Recordset.Fields("name") = Text2.Text
Data1.Recordset.Fields("pnr number") = Text3.Text
Data1.Recordset.Fields("e-mail ID") = Text4.Text
Data1.Recordset.Fields("phone number") = Text5.Text
Data1.Recordset.Update
End Sub
coding
Private Sub Command1_Click()
train.Show
End Sub
coding
Private Sub Command1_Click()
train.Show
End Sub
6.TESTING:
Test case ID: Test_01
Test priority
(Low/Medium/High):Medium
Module name: login
Test title :verify login with valid username and password
Precondition: user has invalid username and password
RESULT:
The online ticket reservation system was designed and implemented successfully.