Online Ticket Reservation System

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 18

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)

payment options select train


(from use case)
issue form (from use case)

(from use case) confirm availability


(from use case)
passenger cancellation
(from actor) (from use case)
login
(from use case)

personal details
(from use case)
enter train details
(from use case)
submit
logout (from use case)

(from use case)

3.2 Class Diagram:


system controller
char : trainname int : no of seats
placename
confirm cancellations()
show rain list() confirm reservation()
payment option() confirm availibility()
issue form() select train()

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

3.4 Sequence Diagram:


:passenger :reservation :updation :ticket detail
form controller database

enters train number,name etc

sends train number,name etc

requests for details

checks for ticket availability

passes confirmity if valid


3.5 Collaboration Diagram
1: enters train number,name etc
:passenge :reservation
r form
5: passes confirmity if valid

4: checks for ticket availability 2: sends train number,name etc

:ticket detail :updation


database controller
3: requests for details

3.6 Component Diagram:


eticket

3.7 Deployment Diagram:

system
passenger

controller

4. DATABASE DESIGN
Database name: Rail
Table name :student name
Field name Datatype
Name Text(50)
Place Integer
Mobile number integer

Table name: reservation

Field name Datatype


Name Text
Age Integer
Place Text
Train and number Text
Seat Selection Text
Sex Text
Date Text
Time Text
From Text
To Text
Food Text
Class Text

Table name : reservation 2

Field name Data type


Adhar no Text
Pan card number Text
e-mail id Text
Mobile number Text

Table name: cancellation

Field name Data type


Train name & number Text
Name Text
Pnr number Text
e-mail ID Text
Phone number Text

Table name: ticket status

Field name Data type


Train name & number Text
Name Text
Pnr number Text
e-mail ID Text
Phone number Text
5. IMPLEMENTATION

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

Private Sub Command2_Click()


Dim ctr As Control
For Each ctr In Me.Controls
If TypeOf ctr Is TextBox Then
ctr.Text = Empty
End If
Next ctr
End Sub
coding
Private Sub Command1_Click()
Form3.Show
End Sub

Private Sub Command2_Click()


Form7.Show
End Sub

Private Sub Command3_Click()


Form9.Show
End Sub

Private Sub Command4_Click()


Form12.Show
End Sub
coding
Private Sub Command1_Click()
Form2.Show
End Sub

Private Sub Command2_Click()


Form6.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

Private Sub Command4_Click()


Dim ctr As Control
For Each ctr In Me.Controls
If TypeOf ctr Is TextBox Then
ctr.Text = Empty
End If
Next
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

Private Sub Command4_Click()


Dim ctr As Control
For Each ctr In Me.Controls
If TypeOf ctr Is TextBox Then
ctr.Text = Empty
End If
Next
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

Private Sub Command4_Click()


Dim ctr As Control
For Each ctr In Me.Controls
If TypeOf ctr Is TextBox Then
ctr.Text = Empty
End If
Next
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

Private Sub Command4_Click()


Dim ctr As Control
For Each ctr In Me.Controls
If TypeOf ctr Is TextBox Then
ctr.Text = Empty
End If
Next
End Sub
coding
Private Sub Command1_Click()
train.Show
End Sub

coding
Private Sub Command1_Click()
Form8.Show
End Sub

Private Sub Command2_Click()


Form8.Show
End Sub
coding
Private Sub Command2_Click()
Form10.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
Private Sub Command4_Click()
Dim ctr As Control
For Each ctr In Me.Controls
If TypeOf ctr Is TextBox Then
ctr.Text = Empty
End If
Next
End Sub
coding
Private Sub Command1_Click()
train.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

Private Sub Command4_Click()


Dim ctr As Control
For Each ctr In Me.Controls
If TypeOf ctr Is TextBox Then
ctr.Text = Empty
End If
Next ctr
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

S. TEST STEPS EXPECTED ACTUAL STATU NOTES


N RESULTS RESULTS S
O
1 Provide valid User should The user is able Success -
User name Be able to to move to next
login Entry
2 Provide valid User should The user is able Success Incase of wrong
password be To login Password was
Able to Successfully given an error
Login Message box was
displayed
3 Click login User should User name and Success Incase user gives
be able to password is wrong entry the
navigate to validated and sign in page
next page next page is remains active
after displayed
validation
4 Click signup User should User navigates success -
be able to to the signup
navigate to page where his
next page user name and
where user password is
enters his validated
credentials

RESULT:
The online ticket reservation system was designed and implemented successfully.

You might also like