Travel Management Project For Computer Science
Travel Management Project For Computer Science
AISSCE
Computer Science
Project Record
SESSION- 2022-2023
Submitted By: Kevin Jacob Field
Class: XII Stream: Science
Rockwoods High School, Udaipur
(DEPARTMENT OF COMPUTER SCIENCE)
BONAFIDE CERTIFICATE
CERTIFIED TO BE THE BONAFIDE RECORD OF WORK DONE BY
DATED…………
SHABBIR MODI
P.G.T. IN COMPUTER SCIENCE
ANJALA SHARMA
PRINCIPAL
DATED ……………
EXTERNAL EXAMINER
SEAL
2
DECLARATION
I hereby declare that this project entitled
“Travel Management System” is the original work
done, written and compiled by me for All India
Senior Certificate Examination in Computer Science
at the Rockwoods High School, Udaipur during the
year 2022-2023.
3
ACKNOWLEDGEMENT
I EXPRESS MY DEEP GRATITUDE AND APPRECIATION TO THOSE
WHO AGREED TO PARTICIPATE IN THIS PROJECT, FOR THEIR TIME
EXPENDED AND COURAGE IN SHARING THEIR INSIGHTS WITH A
FLEDGING STUDENT. IT IS TO THEM THAT I AM MOST INDEBTED,
AND I CAN ONLY HOPE THAT THE PRODUCTS OF OUR
COLLABORATION BENEFITS EACH ONE AS MUCH AS I BENEFITED
FROM THE PROCESS.
GROUP MEMBERS:
1. Kevin Jacob Field (Group leader)
2. KShitij Singh Chouhan
3. Reewa Singh
4
INDEX
5
1.SYNOPSIS
6
Proposed System (new system)
Hardware Requirements:
7
RAM 8 GB and Above
HDD 1 TB Hard Disk Space and Above
Peripherals:
Software Requirements:
Windows 10 OS
Python
MySQL 8.0 Command Line Client
MySQL connector
8
Python interpreters are supported for mainstream operating
systems and available for a few more (and in the past supported many
more). A global community of programmers develops and
maintains CPython, a free and open-source[32] reference
implementation. A non-profit organization, the Python Software
Foundation, manages and directs resources for Python and C Python
development.
9
MySQL is free and open-source software under the terms of the GNU
General Public License, and is also available under a variety
of proprietary licenses.
MySQL connector
Objective
Customer should hold a valid passport with a valid visa to the destination
country; all the necessary information will be collected from the customer
including his telephone number that will be a reference for our agency to check
whether he has an account in our customer database plus the complete address
in the local country and the number of days he will reside in the country he
shall visit finally after payment is done a ticket will be printed on a ticket
boarding card, and a bill receipt will be produced on a dot matrix invoice printer.
10
2.SOURCE CODE
11
import mysql.connector
12
def main_menu():
print('\t\t12.Book for a board')
print('\t\t13.Modify Booking')
print('\t\t14.Delete Booking')
print('\t\t15.My travel log')
print('\t\t0.Exit')
print()
choice1 = int(input('Enter Your Choice='))
if choice1 == 0:
print()
print("Thank you , Visit again !!")
import sys
sys.exit()
if choice1 == 12:
your_location = input('Your location : ')
your_destination = input('Your destination : ')
x=""
while x != 'M' and x != 'F':
gender = input("Your Gender (M / F) : ").upper()
if gender!= 'M' and gender!= 'F':
print("********************INVALID
CHOICE**********************")
else:
break
time = input('time to start board : ')
c1.execute("insert into customer_bookings values(" + str(a) + ",' " +
your_location + " ' ,' " + your_destination + " ' ,' " + time + " ' ,' " +
gender + " ',' " + today + " ' )")
conn.commit()
print()
print('********************************AT YOUR SERVICE
AT', time, "********************************")
13
print()
main_menu()
if choice1 == 13:
print('\t\t 1.Update Location')
print('\t\t 2.Update Destination')
print('\t\t 3.Update Time')
print('\t\t 4.Go back to Main Menu')
print('\t\t 5.Exit')
choice2 = int(input("Enter your choice : "))
if choice2 == 1:
location = input("Enter your modified location : ")
c1.execute("update customer_bookings set Your_location=%s
where Phone_number=%s", (location, a))
conn.commit()
x = ''
while x != 'y' and x != 'n':
ui = input("Do you wish to continue (Y/N) : ").lower()
if ui == 'y':
main_menu()
elif ui == 'n':
import sys
sys.exit()
else:
print("********************INVALID
CHOICE**********************")
print()
elif choice2 == 2:
Destination = input("Enter your modified destination : ")
c1.execute("update customer_bookings set Your_destination=%s
where Phone_number=%s", (Destination, a))
conn.commit()
x = ''
while x != 'y' or 'n':
ui = input("Do you wish to continue (Y/N) : ").lower()
14
if ui == 'y':
main_menu()
else:
import sys
sys.exit()
elif choice2 == 3:
Time = input("Enter your modified Time : ")
c1.execute("update customer_bookings set Time=%s where
Phone_number=%s", (Time, a))
conn.commit()
x = ''
while x != 'y' and x != 'n':
ui = input("Do you wish to continue (Y/N) : ").lower()
if ui == 'y':
main_menu()
elif ui == 'n':
import sys
sys.exit()
else:
print("********************INVALID
CHOICE**********************")
print()
elif choice2==4:
main_menu()
else:
import sys
sys.exit()
if choice1 == 14:
x = ''
while x != 'y' and 'n':
ui = input(
"Are you sure you want to delete all the bookings associated
with this number (Y/N) : ").lower()
if ui == 'y':
15
delete = "delete from customer_bookings where
phone_number= {}".format(a)
c1.execute(delete)
conn.commit()
print(
u'**************************************BOOKINGS
SUCCESSFULLY
DELETED**************************************')
print()
x = ''
while x != 'y' and x != 'n':
ui = input("Do you wish to continue (Y/N) : ").lower()
if ui == 'y':
main_menu()
elif ui == 'n':
import sys
sys.exit()
else:
print("********************INVALID
CHOICE**********************")
print()
else:
import sys
sys.exit()
if choice1 == 15:
c1.execute("select * from customer_bookings where
phone_number like '" + str(a) + "';")
mydata = c1.fetchall()
print("\nPhone number : ", mydata[0][0])
print("Your location : ", mydata[0][1])
print("Your destination :", mydata[0][2])
print("Time : ", mydata[0][3])
print("Gender : ", str(mydata[0][4]))
print("Date booked : ", str(mydata[0][5]))
16
conn.commit()
x = ''
while x != 'y' and x != 'n':
ui = input("Do you wish to continue (Y/N) : ").lower()
if ui == 'y':
main_menu()
elif ui == 'n':
import sys
sys.exit()
else:
print("********************INVALID
CHOICE**********************")
print()
if choice1 != 14 and 12 and 13 and 15:
print()
print()
print("********************INVALID
CHOICE**********************")
import sys
sys.exit()
x = ''
while x != 1 and 2 and 3 and 4:
choice = int(input('Enter your choice : '))
if choice == 1:
print()
a = int(input('Enter your phone number : '))
# Name of the person
u = ("select name from accounts where phone_number = " + str(a)
+ ";")
c1.execute(u)
# Wrong phone number[account doesn't exist]
datan = c1.fetchall()
s = c1.rowcount
s = abs(s)
17
if s != 1:
print()
print("***********************ACCOUNT DOESN'T
EXIST************************")
print()
create = int(input("Press 32 to create account {{or}} Press 0 to
exit="))
if create == 32:
phone_number = int(input('Enter your phone number : '))
name = str(input('Name : '))
password = str(input('password[10] : '))
c1.execute("insert into
accounts(Phone_number,password,name )values(" + str(
phone_number) + ",'" + password + "',' " + name + " ')")
conn.commit()
print(
'**************************************ACCOUNT
SUCCESSFULLY
CREATED**************************************')
x = ''
while x != 'y' and x != 'n':
ui = input("Do you wish to continue (Y/N) : ").lower()
if ui == 'y':
main_menu()
elif ui == 'n':
import sys
sys.exit()
else:
print("********************INVALID
CHOICE**********************")
print()
else:
import sys
18
sys.exit()
datan = datan[0]
datan = list(datan)
datan = datan[0]
datan = str(datan)
# selecting password
y = "select password from accounts where phone_number
=({})".format(a)
c1.execute(y)
data = c1.fetchall()
data = data[0]
data = list(data)
data = data[0]
if b == data:
print()
print("LOGGED IN !!!!!")
print()
print("HI", datan, "!!")
print()
print("What can I do for you?")
print()
main_menu()
if choice == 2:
phone_number = int(input('Enter your phone number : '))
19
name = str(input('Enter your name : '))
password = str(input('password[10] : '))
c1.execute("insert into
accounts(Phone_number,password,name )values(" + str(
phone_number) + ",'" + password + "',' " + name + " ')")
conn.commit()
print(
'**************************************ACCOUNT
SUCCESSFULLY
CREATED**************************************')
x = ''
while x != 'y' and x != 'n':
ui = input("Do you wish to continue (Y/N) : ").lower()
if ui == 'y':
main_menu()
elif ui == 'n':
import sys
sys.exit()
else:
print("********************INVALID
CHOICE**********************")
print()
if choice == 3:
phone_number = int(input("enter your phone number : "))
c1.execute("delete from customer_bookings where phone_number
=" + str(phone_number) + ";")
c1.execute("delete from accounts where phone_number =" +
str(phone_number) + ";")
conn.commit()
print()
print(
20
"**************************************ACCOUNT
SUCCESSFULLY
DELETED**************************************")
x = ''
while x != 'y' and x != 'n':
ui = input("Do you wish to continue (Y/N) : ").lower()
if ui == 'y':
main_menu()
elif ui == 'n':
import sys
sys.exit()
else:
print("********************INVALID
CHOICE**********************")
print()
if choice == 4:
print("Thank you , Visit again !!")
import sys
sys.exit()
21
3.OUTPUTS
22
Logging in:
b)Wit
h valid info:
23
Main Menu:
To Modify booking:
24
a)Update Location:
b)Update Destination:
c)Update Time:
Delete Bookings :
Tables Used:
28
1.Accounts
2. Customer_bookings
Output in MySQL:
4.BIBLIOGRAPHY
1. Website:
www.google.com
29
www.youtube.com
2. Books:
Computer Science with Python Vol 1 by Sumita Arora
Computer Science with Python Vol 2 by Sumita Arora
30