Computer Science Project Group
Computer Science Project Group
KALINGA
COMPUTER PROJECT
SUBMITTED BY:
CLASS/SEC: XII/C
SSCE ROLL NO:
CONTENTS
Certificate
Acknowledgement
Ticket Booking System
Introduction
Objectives
Proposed Systems
SDLC
Phases of SDLC
Source Code
Outputs
Software Testing
Code Completeness Evaluation
Minimum Requirements
Bibliography
CERTIFICATE
Signature of Guide:
Mustaque Ahmed
HOD (Computer Science)
ACKNOWLEDGEMENT
PROPOSED SYSTEM:
PHASES OF SDLC:
PLANNING PHASE
ANALYSIS PHASE
FILE:
adya_functions.py
if len(data) != 0:
print('Account Already Exists with this Email ID! Please Login...')
return None
if len(data) != 0:
print('Account Already Exists with this Phone No.! Please Login...')
return None
if len(data) != 0:
print('Account Already Exists with this Aadhar No.! Please Login...')
return None
connection.commit()
def login(connection, cursor):
s_no = None
email_id = ""
if email_id == "":
register(connection, cursor)
if len(data) == 1:
s_no = data[0][0]
print('LOGIN SUCCESSFUL....')
return s_no
elif len(data) == 0:
print('Invalid Credentials! Please Try Again....')
return s_no
def schedule(cursor):
getall = "SELECT * FROM schedule"
cursor.execute(getall)
data = cursor.fetchall()
return data
ans = 'CANCEL'
while ans == 'CANCEL':
boarding = input("Enter BOARDING LOCATION: ")
destination = input("Enter DESTINATION: ")
if len(schedule) == 0:
print(f"No Travel Services Available from {boarding} to {destination}.")
continue
while True:
v_no = int(input("Enter the Vehicle Number of the Ticket you want to book: "))
if v_no not in v_list:
print("Please Enter Valid Vehicle Number...")
else:
break
n = v_list.index(v_no)
vehicle, departure, arrival = schedule[n][0], schedule[n][4], schedule[n][5]
ticket_ids = []
for i in data:
ticket_ids.append(i[0])
while True:
ticket_id = random.randint(1, 9999)
if ticket_id in ticket_ids:
continue
else:
break
print('TICKET')
print(f'Ticket ID: {ticket_id}')
print(f'Name: {l_name}, {f_name}')
print(f'Seat No: {seat_no}')
print(f'Vehicle No: {v_no} ({vehicle.upper()})')
print(f'ARRIVAL: {arrival} DEPARTURE: {departure}')
print(f'FROM: {boarding} TO: {destination}')
addtohistory = "INSERT INTO history values({}, '{}', {}, '{}', '{}', '{}', '{}', '{}', '{}')"
cursor.execute(addtohistory)
connection.commit()
FILE:Main.py
import mysql.connector as sqltor
from adyafunctions import *
def main():
conn = sqltor.connect(host='localhost', user='root', password='silver@2015',
database='adyatravelagency')
cur = conn.cursor()
if conn.is_connected == False:
print("Connection Failed...")
return
while True:
user_no = None
print("-MENU-")
print("1. Login/Register\n2. Exit")
main_menu_choice = int(input("Choose Appropriate Number: "))
if main_menu_choice == 1:
user_no = login(conn, cur)
elif main_menu_choice == 2:
print("~~~THANK YOU FOR USING OUR SERVICES~~~")
break
else:
print("Choose Valid Option...")
if travel_menu_choice == 1:
ticket_booking(conn, cur, user_no)
elif travel_menu_choice == 2:
schedule(cur)
elif travel_menu_choice == 3:
history(cur, user_no)
elif travel_menu_choice == 4:
user_no = None
print("Successfully Logged Out...")
else:
print("Choose Valid Option...")
if __name__ == "__main__":
main()
OUTPUTS
Upon Running the Program:
Logging in:
Upon Choosing Option 1 in TRAVEL MENU:
Windows OS
Python
MySQL
MySQL connector module
BIBLIOGRAPHY:
Chat.openai.com
Geeksforgeeks.org
Britannica.com
Wikipedia.org
NCERT class 12 CS Book
NCERT class 12 CS Lab Manual