Pages

Tuesday, January 3, 2012

TICKET RESERVATION SYSTEM

TICKET RESERVATION SYSTEM
AIM:
To create a simple and easier method of reserving train tickets.
OBJECTIVE:
The main objective of our railway reservation system is to serve as a very effective and premium portal for the reservation of railways.You can know the train timings,train routes,ticket availability,and much more in just a few clicks.
INFORMATION DESCRIPTION:
DETAILED DESCRIPTION OF PROJECT:
v Search for the required train.
v Check for the availability of the ticket.
v If available reserve the ticket.
v Else search for another train.
HARDWARE DESCRIPTION:
1.Pentium Processor
2. Intel Motherboard
3. RAM 256MB(minimum)
4. Hard disk 40GB(minimum)
SOFTWARE DESCRIPTION:
1. Microsoft VisualBasic6.0
2. Microsoft Access
3. Rational Rose
HUMAN INTERFACE DESCRIPTION:
Interface going to be used is a user friendly interface,it is an online interface which will satisfy the users needs.
FUNCTIONAL DESCRIPTION:
PERFORMANCE CHARACTERISTICS:
§ Fast access
§ Easy access for end users.
§ Simple steps for reservation and cancellation.
DATABASE REQUIREMENTS:
· Details of Indian trains.
· Fare of trains according to classes.
· Percentage of concessions according to persons such as students,senior citizens etc..,
· Above database are stored in MS-Access.
NON FUNCTIONAL REQUIREMENTS:
AVAILABILITY:
Available to all systems around the clock.
Available in any environment
Suites for everyone that is no credit card needed.
Just enter the bank name and account no for payment.
MAINTAINABILITY:
Regular updates of database
Backup of database is maintained to avoid the loss of data due
to power failure.
Less memory space required.
BEHAVIOUR DESCRIPTION:
This project has mainly two functions:-
1.Reservation
Ø Easy and fast steps to reserve a ticket.
Ø Before reserving we can check the availability,timings etc..,
2.Cancellation
Ø Easy and few steps to cancel the tickets.
Ø The money will be automatically refunded in the bank account.
Ø Specified at the time of reservation.
Ø The history of reservation is maintained.
TICKET RESERVATION SYSTEM
USECASE DIAGRAM:


CLASS DIAGRAM:

SEQUENCE DIAGRAM:


COLLABORATION DIAGRAM:
VB SOURCE CODE
Form1.frm:
Private Sub Command1_Click()
If Combo1.Text = "" Then
MsgBox "Choose a Train"
Else
Form2.Show
Form1.Hide
End If
End Sub
Private Sub Form_Load()
Combo1.AddItem "Pallavan"
Combo1.AddItem "Vaigai"
Combo1.AddItem "Hawra"
Combo1.AddItem "Valluvan"
Combo1.AddItem "Theni"
End Sub
Form2.frm:
Private Sub Command1_Click()
Form3.Show
Form2.Hide
End Sub
Private Sub Command2_Click()
Form4.Show
Form2.Hide
End Sub
Private Sub Command3_Click()
Form5.Show
Form2.Hide
End Sub
Private Sub Command4_Click()
End
End Sub
Private Sub Command5_Click()
Form1.Show
Form2.Hide
End Sub
Private Sub Form_Load()
Text1.Text = Form1.Combo1.Text
If Text1.Text = "Pallavan" Then
Form2.Text2.Text = "10.00"
Form2.Text3.Text = "10.30"
ElseIf Text1.Text = "Vaigai" Then
Form2.Text2.Text = "18.00"
Form2.Text3.Text = "18.30"
ElseIf Text1.Text = "Hawra" Then
Form2.Text2.Text = "12.30"
Form2.Text3.Text = "13.00"
ElseIf Text1.Text = "Valluvan" Then
Form2.Text2.Text = "14.00"
Form2.Text3.Text = "16.30"
ElseIf Text1.Text = "Theni" Then
Form2.Text2.Text = "19.00"
Form2.Text3.Text = "23.00"
End If
Data1.Refresh
Data1.Recordset.MoveFirst
Do While Not Data1.Recordset.EOF
If Data1.Recordset.Fields(0) = Trim(Text1.Text) Then
Text4.Text = Data1.Recordset.Fields(3)
Text5.Text = Data1.Recordset.Fields(4)
End If
Data1.Recordset.MoveNext
Loop
End Sub
Form3.frm:
Dim a, b, c As Integer
Private Sub Command2_Click()
Form3.Hide
Form2.Show
End Sub
Private Sub Command1_Click()
a = Data1.Recordset.RecordCount
Data1.Refresh
Data1.Recordset.AddNew
Data1.Recordset.Fields(0) = Text1.Text
Data1.Recordset.Fields(1) = Text2.Text
If b = 1 Then
Data1.Recordset.Fields(2) = Option1.Caption
ElseIf b = 2 Then
Data1.Recordset.Fields(2) = Option2.Caption
End If
Data1.Recordset.Fields(3) = Text3.Text
If c = 1 Then
Data1.Recordset.Fields(4) = Option3.Caption
ElseIf c = 2 Then
Data1.Recordset.Fields(4) = Option4.Caption
End If
Data1.Recordset.Fields(6) = Form2.Text1.Text
a = a + 1
Data1.Recordset.Fields(5) = a
Data1.Recordset.Update
MsgBox "your Seat Reserved"
MsgBox a, , "YOUR CODE"
End Sub
Private Sub Option1_Click()
b = 1
End Sub
Private Sub Option2_Click()
b = 2
End Sub
Private Sub Option3_Click()
c = 1
End Sub
Private Sub Option4_Click()
c = 2
End Sub
Form4.frm:
Dim a As Boolean
Private Sub Command1_Click()
a = False
Data1.Refresh
Data1.Recordset.MoveFirst
Do While Not Data1.Recordset.EOF
If Data1.Recordset.Fields(0) = Trim(Text1.Text) Then
If Data1.Recordset.Fields(5) = Trim(Text2.Text) Then
a = True
Frame1.Visible = True
Text3.Text = Data1.Recordset.Fields(0)
Text4.Text = Data1.Recordset.Fields(1)
If Data1.Recordset.Fields(2) = Trim("Male") Then
Option1.Value = True
Option2.Value = False
ElseIf Data1.Recordset.Fields(2) = Trim("Female") Then
Option2.Value = True
Option1.Value = False
End If
Text5.Text = Data1.Recordset.Fields(3)
If Data1.Recordset.Fields(4) = Trim("A/C") Then
Option4.Value = True
Option3.Value = False
ElseIf Data1.Recordset.Fields(4) = Trim("Ordinary") Then
Option4.Value = False
Option3.Value = True
End If
End If
End If
Data1.Recordset.MoveNext
Loop
If Not a Then
MsgBox "You didnot reserve any seats"
End If
End Sub
Private Sub Command2_Click()
Form3.Show
Form4.Hide
End Sub
Form5.frm:
Dim a As Boolean
Private Sub Command1_Click()
a = False
Data1.Refresh
Data1.Recordset.MoveFirst
Do While Not Data1.Recordset.EOF
If Text1.Text = Data1.Recordset.Fields(0).Value And Text1.Text = Data1.Recordset.Fields(5).Value Then
a = True
MsgBox "Record found.Do u want to cancel the ticket", vbOKCancel
Data1.Recordset.Delete
Data1.Recordset.Update
End If
Data1.Recordset.MoveNext
Loop
If Not a Then
MsgBox "Ticket cancelled"
End If
End Sub
Private Sub Command2_Click()
End
End Sub
OUTPUT FORMS
Train Selection : (Form1.frm)












Train Timings : (Form2.frm)












Reservation : (Form3.frm)













Cancellation : (Form5.frm)
 











Confirmation : (Form4.frm)














RESULT:
Thus the Ticket reservation system was developed by using visual basic in front end and MS-Access in back end.

No comments:

Post a Comment