0% found this document useful (0 votes)
23 views

Python Project

Uploaded by

Chayamani N
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

Python Project

Uploaded by

Chayamani N
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

Bus Booking Application Form

A
Case Study Report
On
“Title – Bus Booking Application
Form”
MASTER OF COMPUTER APPLICATION

Bengaluru City University


By

ANUSHA M G 22P01142
CHAYAMANI N 22P01147

Academic Session: November 2023 to March 2024

1
Bus Booking Application Form

CERTIFICATE
This is to certify that Anusha.M.G,Chayamani.N bearing Registration
Number 22P01142,22P01147 has satisfactorily completed the Dissertation entitled
“Title- Bus Booking Application” in partial fulfillment of the requirements for the
award of the degree of “Master of Computer Applications” at Presidency College
(Autonomous), Bangalore for III Semester MCA during the duration Nov 2023 to
Mar 2024.

S.NO. REGISTER STUDENT NAME MAXIMUM MINIMUM


NUMBER MARK MARK

1. 22P01142 Anusha M G 10

2 22P01147 Chayamani N 10

Faculty in-charge Head of the Department


Department (Mr.N.Prabhakaran) (Dr. Alli)

2
Bus Booking Application Form

INDEX

SL.NO PARTICULAR TOPICS Page No.

1 Synopsis

2 List of Abbreviation, Figures, Tables

3 Introduction

4 Aim and Objective

5 Requirement Specification

6 System Design

7 System Implementation

8 System Testing and Debugging

9 Conclusion and Future Enhancement

10 Advantages of the Application

3
Bus Booking Application Form

11 References and Bibliography

12 Annexure: I - Source Code,


Annexure: II - Screenshots,
Annexure: III -Running Procedure.

4
Bus Booking Application Form

SYNOPSIS

The bus booking application form represents a pivotal advancement in modern travel

technology, offering a seamless and convenient platform for users to plan and book

their bus journeys. At its core, the application simplifies the entire booking process,

enabling users to search for available routes, select preferred departure points and

destinations, choose travel dates and times, and secure their seats with ease.

By leveraging intuitive user interfaces and robust backend systems, the application

ensures a frictionless experience for travelers, eliminating the need for traditional

ticketing methods and cumbersome paperwork. Moreover, the application provides

real-time updates on seat availability, bus schedules, and booking confirmations,

empowering users with timely information and greater flexibility in their travel plans.

With features such as secure payment gateways, paperless ticketing options, and user

reviews, the application enhances security, convenience, and trust, fostering a

seamless and enjoyable travel experience for passengers. Overall, the bus booking

application form revolutionizes the way individuals navigate and engage with the bus

transportation system, offering a modern, efficient, and customer-centric approach to

booking bus tickets.

5
Bus Booking Application Form

LIST OF ABBREVIATION, FIGURES, TABLES

ABBREVIATION
Name Abbreviations Page No.
Tkinter Tk interface 5
SQL My Structured Query Language 5

FIGURES

Figure Name Page No.


Data Architecture 10
Data insertion 23
Data inserted successfully in the database 23
Data updation 24
Data updated successfully in the database 24
Data deletion successful 25

TABLES

Table Name Page No.


Data Table 10

6
Bus Booking Application Form

AIMS AND OBJECTIVES

AIMS:

1. Efficient Bus Management: The primary aim of the online bus application is to
provide an efficient platform for managing bus operations, including scheduling,
ticketing, and tracking.

2. Convenience for Users: The application aims to offer convenience to users by


allowing them to easily book tickets, track buses in real-time, and receive updates
about their journey.

3. Enhanced User Experience: Another aim is to provide a seamless and intuitive user
experience through a well-designed interface and smooth functionality.

4. Optimized Resource Utilization: The application aims to optimize the utilization of


resources such as buses, routes, and personnel to ensure cost-effectiveness and
efficiency.

5. Improved Communication: Facilitating communication between users and bus


operators is also an aim, allowing for timely notifications, alerts, and feedback
mechanisms.

OBJECTIVES:
The main objectives of the online system include:
• To provide a web-based bus ticket-buying functions. Customers can buy bus tickets
through the online system and no need to queue up to buy bus tickets at the counter.
• To enable customers to check the availability of the bus ticket online. Customers can
check the time of departure and arrival for every Transnational bus through the
system.
• To ease the bus ticket payment online. The customer has to pay for the bus ticket by
money services.
• To reduce the number of staff at the point of sale. The number of staff at the counter
can be reduced after the online buying bus ticket system launch.

7
Bus Booking Application Form

INTRODUCTION

The system is the Bus Booking application form. This is the project on the online ticketing
system of the bus company, In most cases; the company has problems with its ticketing and
scheduling process. This project intends to computerize its semi-computerized ticketing system
to provide better customer service. Because of that, the company can provide an easier way of
traveling to the customer or
passenger. Electronic tickets, or tickets, give evidence that their holders have permission to
enter a place of entertainment, use a means of transportation, or have access to some Internet
services.
Online Bus Ticket Reservation System enables the customer to buy bus ticket, make
payments,cancel reservations and ask for information online easily. Furthermore, staff can sell
bus tickets using Bus Ticket Reservation System after check bus ticket availability for the
customer and print the bus ticket to the customer that queue up in the counter.
The Online Bus Booking Application is a Python project aimed at providing a user-friendly
platform for booking bus tickets online. The application streamlines the process of searching
for bus routes, checking seat availability, and making reservations, enhancing the overall travel
experience for users.

Existing system
The System that is being used by the staff at the counter currently is an internal system and
just used to sell the bus ticket at the counter. Customer has to go to the counter to buy bus
ticket or ask for bus schedule. Furthermore, customers need to pay cash when they buy the
bus ticket and sometimes needs to queue up long time to get the bus ticket. Besides that,c
ustomer also not allowed to buy bus ticket through telephone and the bus company'stelephone
has been always-busy line.

PROPOSED SYSTEM
The solution to this problem is to create an online portal for buying bus ticket systems.
Customers can buy the bus tickets over the Internet, 24 hours a day, 7 days

8
Bus Booking Application Form

a week and the bus ticket can't be lost, stolen, or left behind. In addition, the online
system lets the customers check the availability of the bus ticket before they buy a bus
ticket.

REQUIREMENT SPECIFICATION

INTRODUCTION
The sub-section of the software requirement specification is listed below

• PURPOSE
Bus booking application form is a web-based application whose purpose is to
provide users, with a user-friendly experience in applying for bus ticket.

• SCOPE
1. A Bus booking is an essential travel document for those who are traveling
abroad for education, tourism, pilgrimage, medical attendance, business
purposes and family visits.

2. The users will gain access to the available buses per certain routes and
available seats by logging in through the customer’s portal. The staff will
access the system by logging in via the staff portal where they can
compare bus performance and monitor other related business
performance issues.

PRODUCT PERSPECTIVE

The online bus booking application serves as a comprehensive solution for facilitating
bus ticket reservations, catering to the needs of both customers and bus operators. From
the product perspective, it integrates various components to ensure smooth operation
and user satisfaction.

The application provides an intuitive and user-friendly interface for customers to


browse, select, and book bus tickets conveniently. It offers a seamless experience
across different devices, including desktops, tablets, and smartphones. Behind the

9
Bus Booking Application Form

scenes, the application features a robust booking management system. This system
handles reservation requests, seat availability, and payment processing in real-time. It
ensures accurate booking data and minimizes the risk of overbooking.

• OPERATING ENVIRONMENT
3. Platform – IDLE

4. Database – SQL

5. Operating System – Windows 8 or higher versions

6. Web – Chrome, Microsoft Edge

10
Bus Booking Application Form

Functional Requirements:

Non-Functional Requirements: 1.
Performance:
• The application should respond quickly to user actions, with minimal latency
during search, booking, and payment processes.
• It should be capable of handling a large number of concurrent users without
significant performance degradation.

2. Security:
• User data should be stored securely and encrypted to prevent unauthorized
access.
• Payment transactions should be conducted over secure connections (HTTPS)
to protect sensitive information.

3. Scalability:
• The system should be designed to scale horizontally to accommodate
increased traffic and user demand over time.

4. Reliability:
• The application should be highly reliable, with minimal downtime or service
interruptions.
• Backup and recovery mechanisms should be in place to ensure data integrity
and availability in case of system failures or disasters.

5. Usability:
• The user interface should be intuitive and easy to navigate, even for users with
limited technical expertise.
• Clear instructions and error messages should be provided throughout the
application to guide users and prevent confusion.

6. Compatibility:
• The application should be compatible with a wide range of web browsers and
devices, including desktops, laptops, tablets, and smartphones.

11
Bus Booking Application Form

• It should adhere to web standards and best practices to ensure consistent


behavior across different platforms.

System Design

The data architecture for the bus booking application form encompasses a structured framework
designed to efficiently manage and process various types of data associated with booking bus
tickets. At its core, the architecture revolves around four key components: user data, booking
data, bus operator data, and system data.
User data encompasses information related to customers who use the application, including
personal details such as name, contact information, and payment preferences. This data is stored
securely in a user database and is used for user authentication, account management, and
personalized services.
Booking data consists of details pertaining to bus reservations made by users, such as travel
dates, departure points, destination cities, and seat preferences. This data is stored in a booking
database and is essential for managing seat availability, generating booking confirmations, and
processing payments. Additionally, booking data may include information on ticket prices,
discounts, and special offers.
Bus operator data comprises information about the various bus operators that provide services
through the application, including company profiles, route schedules, and bus fleet details. This
data is stored in an operator database and is used for displaying available routes, updating bus
schedules, and managing partnerships with bus companies.

12
Bus Booking Application Form

System data encompasses information related to the internal functioning of the application,
such as logs, audit trails, and configuration settings. This data is stored in a system database
and is used for monitoring system performance, tracking user activities, and troubleshooting
issues.

DATA FLOW DIAGRAM:

13
Bus Booking Application Form

Bus Table:

14
Bus Booking Application Form

COLUMN NAME DATATYPE PRIMARY KEY NULL

id int yes No

name varchar (30) No yes

age int No yes

email Varchar(255) yes yes

phone int No yes

gender Varchar(30) No yes

source Varchar(30) No yes

destination Varchar(30) No yes

Journey_date time No yes

Data table-1

15
Bus Booking Application Form

16
Bus Booking Application Form
Bus Booking Application Form

SYSTEM IMPLEMENTATION

CODE FOR BOOKING FORM:

import tkinter as tk from


tkinter import ttk import
mysql.connector

def submit_form():
name = name_entry.get() age =
age_entry.get() email =
email_entry.get() phone =
phone_entry.get() gender =
gender_var.get() source =
source_entry.get() destination =
destination_entry.get() journey_date
= date_entry.get()

# Establish MySQL connection


mydb = mysql.connector.connect(
host="localhost", user="root",
password="", database="bus"
)

mycursor = mydb.cursor()

# Insert data into the database


sql = "INSERT INTO bookings (name, age, email, phone, gender, source, destination,
journey_date) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)" val = (name, age, email,
phone, gender, source, destination, journey_date) mycursor.execute(sql, val)

11

18
Bus Booking Application Form

mydb.commit()

print(mycursor.rowcount, "record inserted.")

# Close the connection


mydb.close()

# Create main window root = tk.Tk()


root.title("Bus Booking Application")

# Create labels and entry fields name_label = ttk.Label(root,


text="Name:") name_label.grid(row=0, column=0, padx=5,
pady=5, sticky="e") name_entry = ttk.Entry(root)
name_entry.grid(row=0, column=1, padx=5, pady=5)

age_label = ttk.Label(root, text="Age:") age_label.grid(row=1,


column=0, padx=5, pady=5, sticky="e") age_entry =
ttk.Entry(root) age_entry.grid(row=1, column=1, padx=5,
pady=5)

email_label = ttk.Label(root, text="Email:")


email_label.grid(row=2, column=0, padx=5, pady=5, sticky="e")
email_entry = ttk.Entry(root) email_entry.grid(row=2,
column=1, padx=5, pady=5)

phone_label = ttk.Label(root, text="Phone:")


phone_label.grid(row=3, column=0, padx=5, pady=5, sticky="e")
phone_entry = ttk.Entry(root) phone_entry.grid(row=3,
column=1, padx=5, pady=5) gender_label = ttk.Label(root,
text="Gender:") gender_label.grid(row=4, column=0, padx=5,
pady=5, sticky="e") gender_var = tk.StringVar()
gender_combobox = ttk.Combobox(root,
textvariable=gender_var, values=["Male",
19
Bus Booking Application Form

"Female", "Other"]) gender_combobox.grid(row=4,


column=1, padx=5, pady=5)

source_label = ttk.Label(root, text="Source:")


source_label.grid(row=5, column=0, padx=5, pady=5, sticky="e")
source_entry = ttk.Entry(root) source_entry.grid(row=5,
column=1, padx=5, pady=5)

destination_label = ttk.Label(root, text="Destination:")


destination_label.grid(row=6, column=0, padx=5, pady=5, sticky="e")
destination_entry = ttk.Entry(root) destination_entry.grid(row=6,
column=1, padx=5, pady=5)

date_label = ttk.Label(root, text="Date of Journey:")


date_label.grid(row=7, column=0, padx=5, pady=5, sticky="e")
date_entry = ttk.Entry(root) date_entry.grid(row=7, column=1,
padx=5, pady=5)

# Create submit button


submit_button = ttk.Button(root, text="Submit", command=submit_form)
submit_button.grid(row=8, column=0, columnspan=2, padx=5, pady=5)

root.mainloop()

System Testing and Debugging

20
Bus Booking Application Form

Fig-3 Testing and Debugging

The above error is due to the missing of one parameter in the inserting data into the database
that is,
SQL query to insert data into the database
sql = "INSERT INTO VALUES bookings (name, age, email, phone, gender, source,
destination, journey_date) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)" val =
(name, age, email, phone, gender, source, destination, journey_date)

In the above query , the column names given are 9 which includes (name, age, email, phone,
gender, source, destination, journey_date) but the corresponding values count are 8 .
This is the reason for error
To run this application without error , the query should be corrected as: SQL query
to insert data into the database sql = "INSERT INTO VALUES bookings (name,
age, email, phone, gender, source, destination, journey_date) VALUES (%s, %s, %s,
%s, %s, %s, %s, %s)" 21
Bus Booking Application Form

Advantages of bus booking application form

The bus booking application form offers a multitude of advantages, revolutionizing the way
travelers plan and book their bus journeys. Here are some of the key advantages:
1. Convenience: One of the primary advantages of a bus booking application form is the
convenience it offers to travelers. With just a few clicks or taps, users can search for
bus routes, compare fares, select preferred seats, and complete the booking process
from the comfort of their homes or on the go.
2. Accessibility: Unlike traditional methods of booking bus tickets, which may require
physical visits to ticket counters or travel agencies, a bus booking application form is
accessible 24/7 through smartphones, tablets, or computers. This accessibility allows
users to book tickets at any time and from anywhere with an internet connection.
3. Wide Range of Options: Bus booking applications typically offer a wide range of
bus operators, routes, timings, and seating options, providing users with ample
choices to suit their preferences and travel needs. This variety allows travelers to find
the most convenient and cost-effective options for their journeys.
4. Real-Time Updates: Bus booking applications often provide real-time updates on
seat availability, bus schedules, delays, and cancellations. This real-time information
empowers travelers to make informed decisions and adapt their travel plans
accordingly, minimizing inconvenience and uncertainty.
5. Secure Transactions: Bus booking applications prioritize security and privacy,
employing robust encryption techniques and secure payment gateways to safeguard
users' financial information and personal data. This ensures that users can make
transactions confidently without worrying about data breaches or fraud.
6. Paperless Tickets: By opting for e-tickets or mobile tickets, bus booking applications
contribute to environmental sustainability by reducing the consumption of paper and
the need for physical ticket printing. E-tickets are stored digitally on users' devices,
eliminating the hassle of carrying and keeping track of paper tickets.

7. Flexibility and Customization: Bus booking applications offer flexibility and


customization options, allowing users to select preferred departure points,
destinations, travel dates, and seating preferences. Users can also choose from various
payment methods and add-ons such as insurance or meal packages to tailor their travel
experience.

22
Bus Booking Application Form

8. User Reviews and Ratings: Many bus booking applications feature user reviews and
ratings for bus operators and routes, providing valuable insights and recommendations
to prospective travelers. These reviews help users make informed decisions and
choose reputable operators with good service quality and customer satisfaction.

Conclusion

The Bus Booking Application Form project aims to provide a convenient and efficient platform
for users to book bus tickets online. By leveraging Python and related technologies, the project
intends to offer a seamless booking experience while ensuring security and reliability. Through
the project report, the development process, challenges faced, and solutions implemented will
be documented, providing insights into the creation of such applications.

23
Bus Booking Application Form

Future enhancement

The bus booking application form, several key areas can be targeted to further elevate user
experience, operational efficiency, and technological capabilities. One significant area for
enhancement lies in the realm of personalization and customization. By leveraging advanced
data analytics and machine learning algorithms, the application can intelligently analyze user
preferences, historical booking patterns, and travel behaviors to offer personalized
recommendations, tailored promotions, and optimized travel itineraries. This personalized
approach not only enhances user satisfaction but also fosters loyalty and retention.
Furthermore, integrating emerging technologies such as artificial intelligence and natural
language processing can revolutionize customer support and interaction within the application.
Implementing chatbots or virtual assistants powered by AI can provide instant responses to
customer queries, assist in booking processes, and offer proactive support throughout the travel
journey. These intelligent agents can also automate routine tasks, streamline communication
channels, and provide real-time updates, thereby enhancing overall efficiency and
responsiveness.

REFERENCES:

https://www.python.org/ https://www.google.com/
https://www.udemy.com/
https://www.geeksforgeeks.org/
https://code.visualstudio.com
https://w3school.com
ANNEXURE: I - SOURCE CODE, II – SCREENSHOTS AND III –
RUNNING PROCEDURE SOURCE CODEFOR BACKEND [app.py]

import tkinter as tk from


tkinter import ttk import
mysql.connector

def submit_form():
name = name_entry.get() age =
age_entry.get() email =
email_entry.get() phone = 24
Bus Booking Application Form

phone_entry.get() gender =
gender_var.get() source =
source_entry.get() destination =
destination_entry.get() journey_date
= date_entry.get()

# Establish MySQL connection


mydb = mysql.connector.connect(
host="localhost", user="root",
password="", database="bus"
)

mycursor = mydb.cursor()

# Insert data into the database


sql = "INSERT INTO bookings (name, age, email, phone, gender, source, destination,
journey_date) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)" val = (name, age, email,
phone, gender, source, destination, journey_date) mycursor.execute(sql, val)
mydb.commit()

print(mycursor.rowcount, "record inserted.")

# Close the connection


mydb.close()

# Create main window root = tk.Tk()


root.title("Bus Booking Application")

# Create labels and entry fields name_label = ttk.Label(root,


text="Name:") name_label.grid(row=0, column=0, padx=5,
pady=5, sticky="e") name_entry = ttk.Entry(root)
name_entry.grid(row=0, column=1, padx=5, pady=5)

25
Bus Booking Application Form

age_label = ttk.Label(root, text="Age:") age_label.grid(row=1,


column=0, padx=5, pady=5, sticky="e") age_entry =
ttk.Entry(root) age_entry.grid(row=1, column=1, padx=5,
pady=5)

email_label = ttk.Label(root, text="Email:")


email_label.grid(row=2, column=0, padx=5, pady=5, sticky="e")
email_entry = ttk.Entry(root) email_entry.grid(row=2,
column=1, padx=5, pady=5)

phone_label = ttk.Label(root, text="Phone:")


phone_label.grid(row=3, column=0, padx=5, pady=5, sticky="e")
phone_entry = ttk.Entry(root) phone_entry.grid(row=3,
column=1, padx=5, pady=5) gender_label = ttk.Label(root,
text="Gender:") gender_label.grid(row=4, column=0, padx=5,
pady=5, sticky="e") gender_var = tk.StringVar()
gender_combobox = ttk.Combobox(root,
textvariable=gender_var, values=["Male",
"Female", "Other"]) gender_combobox.grid(row=4,
column=1, padx=5, pady=5)

source_label = ttk.Label(root, text="Source:")


source_label.grid(row=5, column=0, padx=5, pady=5, sticky="e")
source_entry = ttk.Entry(root) source_entry.grid(row=5,
column=1, padx=5, pady=5)

destination_label = ttk.Label(root, text="Destination:")


destination_label.grid(row=6, column=0, padx=5, pady=5, sticky="e")
destination_entry = ttk.Entry(root) destination_entry.grid(row=6,
column=1, padx=5, pady=5)

date_label = ttk.Label(root, text="Date of Journey:")


date_label.grid(row=7, column=0, padx=5, pady=5, sticky="e")
date_entry = ttk.Entry(root) date_entry.grid(row=7, column=1,
padx=5, pady=5)
26
Bus Booking Application Form

# Create submit button


submit_button = ttk.Button(root, text="Submit", command=submit_form)
submit_button.grid(row=8, column=0, columnspan=2, padx=5, pady=5)

root.mainloop()

Ⅱ- SCREENSHOTS :

27
Bus Booking Application Form

28
Bus Booking Application Form

29
Bus Booking Application Form
Bus Booking Application Form

III – RUNNING PROCEDURE

Downloading and Installing the Software

▪ Step 1: Download & Install python latest version from the official website
https://www.python.org/
▪ Step 2: Set the path variables in the system environment variables and check if the python is
installed or not using the python –version command in the command prompt.
▪ Step 3: Install tkinter using the command prompt by using the command pip install tkinter and
set the system environment variables.
▪ Step 4: Download & Install XAMPP server from the official website
https://www.apachefriends.org/

Step 5: Install MySQL connector using command prompt and configuring it

▪ Step 6:After installing MySQL create a database called passport.

▪ Step 7: Write the code for passport registration form

▪ Step 8: Data given by users should be stored in database and delete or update accordingly..
The project should be start running on the server successfully.

To Run the Application

• Step 1: Create a database called passport in MySQL.

• Step 2: Create a table called bus booking registration

• Step 3: Open privileges in the Database and enter Username , Password .

• Step 4: Enter the Database name in the python source code.

24
Bus Booking Application Form
Bus Booking Application Form

• Step 5: Database is connected to the frontend of the application.

• Step 6: Now run the source code module and submit the form , the values entered in the
form will be displayed in the database .

25
Bus Booking Application Form

You might also like