Vous êtes sur la page 1sur 20

ONLINE TICKET RESERVATION SYSTEM

A.1 SCOPE
The manual system of ticket reservation takes more time and the number of
reservations per day is limited. To increase the efficiency of the process, we go for
online ticket reservation system. This system supports online ticket booking.

A.1.1 Audience:
The intended audience of this system are the passengers and the system
administrator.

A.2 PROBLEM STATEMENT

An online reservation system is software that helps in reservation of railway


tickets in the internet and check for the availability of tickets. This system shows all
the information about all the transport services including their source and destination,
and the time of arrival and departure of all trains and the availability of seats in all the
trains.

This system also has the facility of cancellation of tickets. If the tickets are not
available, then the current status of the system is also known through this system.

The online reservation system maintains the full details of the entire passenger
who are reserving the tickets in the specified railway services.

A.3 USE-CASE DIAGRAM

The Online Ticket Reservation System uses the following use-cases.

1. login
2. reserve/cancel
3. add/delete train
4. view/print ticket
5. availability
6. database
7. logout

The actors in this system are

1. Passenger
2. System Administrator

Use-case: login
The user enters a username and a password. And if the entered details are
valid, the user’s details are brought to the screen; if they are invalid then an
appropriate message is displayed.
Use-case: reserve/cancel
The user is allowed to book a ticket on the train he requires and the date and
time as is necessary for the user. The user has to provide details such as name, train
number, date of travel, departure time, and can view the price of the ticket. A
passenger can also decide to cancel a ticket after the ticket is booked. The passenger
has to provide details about ticket for searching and details about him for
confirmation of identity.

Use-case: view/print ticket


The user after booking a ticket can view/print a copy of the ticket reserved.
The user has to provide the details about ticket number for searching in the database
and passenger name for confirming passenger identity.

Use-case: availability
The passenger can view the trains and seats available in the database for
deciding which train’s ticket he wishes to book. The passenger can view the details of
trains such as, train number, price, departure and arrival times.

Use-case: add/delete train


Only the administrator has privilege to add trains. The administrator can add
the train on which tickets can be booked by the passengers. The administrator has to
provide details about a new train such as train number, price, departure time, date of
travel. The administrator also has the privilege to delete trains that are not necessary.
The administrator has to provide details about the train for searching and inform any
passengers that have booked tickets on the train about the change and make necessary
arrangements.

Use-case: database
It stores all the data that are related to this Online Ticket Reservation system.
The data include train details, passenger details, ticker details, availability details etc.

Use-case: logout
After the necessary operations have been performed on the system, the user
can choose to logout from the system.

Actor: passenger
The end-user who uses the system for booking tickets.

Actor: system administrator


The overall administrator of the system, who does all the maintenance of
details and system.
login

reserve/cancel

passenger add/delete train

system administrator

view/print ticket

availability

database

logout

Fig A-1: overall use-case scenario for Online Ticket Reservation System
A.4 CLASS DIAGRAM

The class diagram is a graphical representation of all the classes used in the
system and their operations, attributes and relationships.

The online ticket reservation system makes use of the following classes:
o Ticket system
o Train details
o Ticket

Ticket system
It consists of two attributes and two operations. The attributes are username
and password. The operations used are login () and logout ().

Train details
It stores the details of all the trains such as train number, train name, and seat
availability. The operations available are add (), delete () and view ().

Ticket
It records the details of every ticket booked such as ticket number, passenger
name, and train number, from place, to place, seat availability, date of travel,
departure time, arrival time, and price. The operations available are add (), delete (),
view (), and print ().
Train Details
Ticket System train_no
username train_name
password seats_avail

login() add()
logout() delete()
view()

Ticket
ticket_no
passenger_name
train_no
from
to
date
seat_avail
dep_time
arr_time
price

add()
delete()
view()
print()

Fig A-2: Class diagram for Online Ticket Reservation System


A.5 SEQUENCE DIAGRAMS

Sequence Diagram: system administrator adds/deletes a train


The Administrator has the privilege to add/delete train. He has to provide
details about the new train that is being created in the database.

: Ticket : Train Details


: system
System
administrator
1: login( )

2: add( )

3: delete( )

4: logout( )

Fig A-3: add/delete a train


Sequence Diagram: Passenger checking availability
The passenger has the privilege to check the availability of the seats in a
particular train.

: Ticket : Train Details


System
: passenger
1: login( )

2: view( )

3: logout( )

Fig A-4: availability of seats


Sequence Diagram: Passenger reserves/cancels a ticket
The passenger reserves/cancels a ticket according to the privileges given to
him. He can view the details of the train he wants to book.

: Ticket : Ticket
System

: passenger

1: login( )

2: reserve( )

3: cancel( )

4: logout( )

Fig A-5: reserve/cancel ticket


Sequence Diagram: Passenger views/prints the ticket
The passenger can login into the system and view the tickets booked by him
by giving details of the train number and ticket number.

: Ticket : Ticket
System
: passenger

1: login( )

2: view( )

3: print( )

4: logout( )

Fig A-6: view/print ticket


A.6 COLLABORATION DIAGRAMS

Collaboration Diagram: add/delete train

1: login( )
: Ticket
System

: system administrator

4: logout( )
2: add( )
3: delete( )

: Train
Details

Fig A-7: add/delete train


Collaboration Diagram: availability

1: login( )
: Ticket
System

: passenger
3: logout( )

2: view( )

: Train
Details

Fig A-8: availability

Collaboration Diagram: reserve/cancel ticket

1: login( )
: Ticket
System

: passenger
4: logout( )

2: reserve( )
3: cancel( )

: Ticket

Fig A-9: reserve/cancel ticket


Collaboration Diagram: view/print ticket

1: login( )
: Ticket
System

: passenger
4: logout( )

2: view( )
3: print( )

: Ticket

Fig A-10: view/print ticket


A.7 ACTIVITY DIAGRAM

Activity Diagram: add/delete train

login

valid invalid

add/delete invalid user


trains

Fig A-11: add/delete train


Activity Diagram: availability

login

valid invalid

availability seats filled

Fig A-12: availability


Activity Diagram: reserve/cancel train

login

invalid
valid
reserve/cancel invalid user

Fig A-13: reserve/cancel train

Activity Diagram: view/print ticket

login

invalid

valid
view/print invalid user
ticket

Fig A-14: view/print ticket


A.8 FORM DESIGN

Login

Fig A-15: Login Form


Coding
Private Sub com_ok_Click()
If Tex_nam.Text = "" And tex_pas = "" Then
Frame1.Visible = True
Else

MsgBox "INVALID USERNAME AND PASSWORD"


End If
End Sub

Private Sub Command1_Click()


passenger.Show
End Sub

Private Sub Command3_Click()


flight.Show
End Sub

Private Sub Command4_Click()


Unload Me
End Sub

Private Sub Form_Load()


tex_pas.Text = Clear
Frame1.Visible = False
End Sub
Availability

Fig A-16: Availability Form


Coding
Private Sub check_Click()
Unload Me
flight.Show
End Sub

Private Sub can_Click()


Unload Me
End Sub

Train Details

Fig A-17: Train Details Form


Coding
Private Sub Command1_Click()
Unload Me
passenger.Show
End Sub

Reserve/Cancel Ticket

Fig A-18: Reserve/Cancel Form


Coding
Private Sub ad_Click()
Data1.Recordset.AddNew
End Sub

Private Sub can_Click()


If Data1.Recordset.RecordCount = 0 Then
MsgBox "No More Records"
Else
Select Case fno.Text
Case "1111"
railway.Data1.Recordset.Edit
railway.Data1.Recordset.Fields(0).Value = railway.Data1.Recordset.Fields(0).Value
+1
railway.Data1.Recordset.Update
Case "2222"
railway.Data1.Recordset.Edit
railway.Data1.Recordset.Fields(1).Value = railway.Data1.Recordset.Fields(1).Value
+1
railway.Data1.Recordset.Update
Case "3333"
railway.Data1.Recordset.Edit
railway.Data1.Recordset.Fields(2).Value = railway.Data1.Recordset.Fields(2).Value
+1
railway.Data1.Recordset.Update
Case "4444"
railway.Data1.Recordset.Edit
railway.Data1.Recordset.Fields(3).Value = railway.Data1.Recordset.Fields(3).Value
+1
railway.Data1.Recordset.Update
Case "5555"
railway.Data1.Recordset.Edit
railway.Data1.Recordset.Fields(4).Value = railway.Data1.Recordset.Fields(4).Value
+1
railway.Data1.Recordset.Update
End Select
Data1.Recordset.Delete
Data1.Recordset.MoveNext
If Data1.Recordset.EOF = True Then
Data1.Recordset.MovePrevious
End If
End If
End Sub

Private Sub Command1_Click()


railway.Show
End Sub

Private Sub Command2_Click()


Unload Me
End Sub

Private Sub submit_Click()


Select Case fno.Text
Case "1111"
railway.Data1.Recordset.Edit
railway.Data1.Recordset.Fields(0).Value = railway.Data1.Recordset.Fields(0).Value -
1
railway.Data1.Recordset.Update
Case "2222"
railway.Data1.Recordset.Edit
railway.Data1.Recordset.Fields(1).Value = railway.Data1.Recordset.Fields(1).Value -
1
railway.Data1.Recordset.Update
Case "3333"
railway.Data1.Recordset.Edit
railway.Data1.Recordset.Fields(2).Value = railway.Data1.Recordset.Fields(2).Value -
1
railway.Data1.Recordset.Update
Case "4444"
railway.Data1.Recordset.Edit
railway.Data1.Recordset.Fields(3).Value = railway.Data1.Recordset.Fields(3).Value -
1
railway.Data1.Recordset.Update
Case "5555"
railway.Data1.Recordset.Edit
railway.Data1.Recordset.Fields(4).Value = railway.Data1.Recordset.Fields(4).Value -
1
railway.Data1.Recordset.Update
End Select
Data1.Recordset.Update
End Sub

A.9 COST ESTIMATION

Table A-1: Cost Estimation


A.10 CONSLUSION
Thus, the problem of online ticket reservation system was successfully
analyzed, designed, implemented, verified and tested and various UML diagrams
were drawn successfully. This project is used to carrying the online reservation
efficiently with a reduced time. This project further can be enhanced as using database
in the run time only for particular user’s source and destination. This can be one of the
good and efficient online ticket reservation systems.

Vous aimerez peut-être aussi