Hotel Booking
Hotel Booking
ROLL NO :
NAME : SANIDHYA KHARAYAT
CLASS : XII “A”
SUBJECT : COMPUTER SCIENCE
SUB CODE : 083
PROJECT GUIDE : MR. DEVENDRA MAHORI
CONTENTS
S No. NAME Page no.
1. Certificate 3
2. Acknowledgement 4
3. Project analysis 6
4. About python 7
5. About MySQL 8
10. Bibliography 24
J.B. MEMORIAL MANAS ACADEMY
CERTIFICATE
This is to certify that SANIDHYA KHARAYAT Roll no. __ has
successfully completed the project work entitled HOTEL BOOKING
SYSTEM in the subject computer science (083) laid down in the
regulation of CBSE for the purpose of practical examination in Class XII to
be held in J.B. MEMORIAL MANAS ACADEMY on ________________
Examiner:
Name:
Signature:
Acknowledgment
Apart from the effort of me, the success of any project depends largely on
the encouragement and guidelines of many other. I take this opportunity to
express my gratitude to the people who have been instrumental in the
successful completion of this project.
My sincere thanks Mr. Devendra Mahori (PGT CS), A guide, Mentor all
of the above a friends, who critically reviewed my project and helped in
solving each and every problem, occurred during implementation of the
project.
The guidance and support received from all the members who
contributed and who are contributing to this project, was vital for the
success of the project. I am grateful for their constant support and help.
PROJECT ON
HOTEL BOOKING
SYSTEM
SESSION : 2023-2024
PROJECT ANALYSIS
I have looked for some basic requirements required for hotel for online
booking so on that I have written this program.
This program uses PYTHON and MYSQL as platform to carry out the
task.
ABOuT PYTHON
Python is a high-level, interpreted programming language that emphasizes
readability and simplicity. Developed by Guido van Rossum and first released
in 1991, Python has become one of the most popular and versatile programming
languages. Some key features include:
• Readability: Python's syntax is designed to be clear and readable, making it
accessible for both beginners and experienced developers.
• Versatility: Python supports multiple programming paradigms, including
procedural, object-oriented, and functional programming. This versatility makes
it suitable for a wide range of applications.
• Dynamic Typing: Python is dynamically typed, allowing for flexibility
in variable assignments and function parameters.
• Open Source: Python is an open-source language, fostering
collaboration and allowing developers to contribute to its
development.
• Interpreted Language: Python is an interpreted language, which means
that code can be executed line by line. This facilitates quick testing and
prototyping.
OBJECTIVE :
import mysql.connector
host = 'localhost'
user = 'root'
password = 'sanidhya@417'
database = 'booking'
port = 3306
try:
conn = mysql.connector.connect(
host=host,
database=database,
user=user,
password=password,
port=port,
auth_plugin='mysql_native_password'
)
# Check if the connection is successful
if conn.is_connected():
except mysql.connector.Error as e:
print(f"Error: {e}")
finally:
conn.close()
function
Output
Source code:-
import sqlite3
conn = sqlite3.connect('hotel.db')
cursor = conn.cursor()
cursor.execute('''
''')
cursor.execute('''
customer_name TEXT,
room_number INTEGER,
status TEXT DEFAULT 'Booked',
''')
def create_room(room_number):
conn.commit()
def display_available_rooms():
available_rooms = cursor.fetchall()
print("Available Rooms:")
print(room[0])
def view_booking():
available_rooms = cursor.fetchall()
print("All Booking Details:")
print(room)
conn.commit()
conn.commit()
cancel_booking(customer_name, old_room_number)
book_room(customer_name, new_room_number)
# usage:
if __name__ == "__main__":
print()
print("H O T E L M A N A G E M E N T S Y S T E M")
print(‘*’*100)
while True:
print("7. Exit")
if choice == '1':
create_room(a)
elif choice=='2':
display_available_rooms()
book_room(cust, rno)
elif choice=='4':
view_booking()
cancel_booking(cust, rno)
update_booking(cust,rno,ono)
elif choice=='7':
break;
else:
conn.close()
Output window:-
ADDING NEW ROOM
VIEW AVAILABLE ROOMS
ADD A BOOKING
VIEW ALL BOOKING
CANCEL BOOKING
UPDATE BOOKING
ENHANCEMENTS AND fEATuRE IDEAS-
EASY MENU SETUP –
Menu configuration in the hotel has to be simple and easy . No one wants the terminal or
server to reboot when you want to make minor changes in it. This goes a long way in ensuring
profitability and long term success.
USER AUTHENTICATION -
EMAIL NOTIFICATIONS –
Implement an email notification system to remind users of upcoming due dates, overdue booking
, when a reserved room becomes available.
SPEED –
Speed is an important factor to consider. A slow system can be chaotic for everyone. The speed also
increases ease .
SECURITY -
Security is most important ensures that data must be secure and the software must be safe from the
attack of the hackers.
BIBLIOGRAPHY
2. https://www.google.com
4. School Lab .