0% found this document useful (0 votes)
5 views40 pages

Acknowledgement 1

Uploaded by

anantsharm.44
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views40 pages

Acknowledgement 1

Uploaded by

anantsharm.44
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 40

Page | 1

ACKNOWLEDGEMEN
T
Apart from the efforts of me, the success of any project
depends largely on the encouragement and guidelines
of many others. I take this opportunity to express my
gratitude to the people who have been instrumental in
the successful completion of this project. I express my
heartfelt gratitude to my parents for constant
encouragement while carrying out this project. I would
like to express a deep sense of thanks & gratitude to
my guide MRS. ANITA SALUJA for guiding me
immensely through the course of the project.

Last but not the least I would like to thanks all those
who had helped directly and indirectly towards the
completion of this project.
Page | 2

CERTIFICATE
Certified that the work contained in the project titled
“HOTEL MANAGEMENT SYSTEM,” by: ANANT SHARMA
has been carried out under my supervision and that
this work has not been submitted elsewhere for a AISSE
certificate. Year 2024-2025

MRS. ANITA SALUJA SIGNATURE:


COMPUTER SCIENCE _______________
D.S. MEMORIAL PUBLIC SR. SEC. SCHOOL
Page | 3

INDEX

1. Abstract…………………
2. Introduction…………………
3. Python Code…………………
4. Outputs…………………
5. Databases and Table
Structures….
6. Backend Data…………………
7. Conclusion…………………
8. Bibliography…………………

ABSTRACT
The Project HOTEL MANAGEMENT SYSTEM is a web-
based application that allows the hotel manager to
Page | 4

handle all hotel activities online. Interactive GUI and


the ability to manage various hotel bookings and rooms
make this system very flexible and convenient. The
hotel manager is a very busy person and does not have
the time to sit and manage the entire activities
manually on paper. This application gives him the
power and flexibility to manage the entire system from
a single online system.

Hotel Management project provides room booking, staff


management and other necessary hotel management
features. The system allows the manager to post
available rooms in the system. Customers can view and
book room online. Admin has the power of either
approving or disapproving the customer’s booking
request.

Other hotel services can also be viewed by the


customers and can book them too. The system is hence
useful for both customers and managers to portably
manage the hotel activities.
Page | 5

HOTEL MANAGEMENT
SYSTEM

INTRODUCTION
Hotel Management System deals with the maintenance
of a guest’s bill during one’ s stay at the hotel and
withal the allocation of rooms for them. It contains all
the basic functions which include entering customer’s
data, calculating room rent, restaurant bill, laundry bill,
game bill, and total cost. In this mini project, there is no
such login system. This means he can use all those
available features easily without any restriction. It is too
easy to use, he can check the total cost of staying in
the hotel easily with every single detail.
Talking about the features of this Simple Hotel
Management System, at first, the user must enter his
data. It includes the name of the user, address, check-
in, and check-out dates. The user can calculate room
rents. Inside this section, there are total four types of
room with different prices. After selecting the room
type, the system asks to enter the number of nights
spent to calculate room rent.
Page | 6

This simple system also contains other functions such


as calculating restaurant, laundry, and gaming bill.
When the user selects to calculate restaurant bill, the
system displays a small menu. From there the user
must select foods and then it displays the total
restaurant bill. The other remaining features also follow
the same procedure.

At last, after all these calculations the user can know


about their cost of staying easily. In this feature, the
system provides his details, with the room number,
room rent, food, laundry, and games bill. The total sum
is displayed to the users with some additional charges.
This simple console-based Hotel Management System
provides the simplest management of hotel service and
transaction. In short, this project mainly focuses on
adding and calculating results.

In our proposed system,


Page | 7

We have the provision for adding details and


requirements of the customer by themselves. So, the
overhead of the hotel management and the employees
becomes less. The customer can use all those available
features easily without any restriction. It is too easy to
use; the customer can check the total cost of staying in
the hotel easily with every detail. It also manages the
bill of the customer felicitously without any
mismatches.

Our proposed system has many advantages:


 The system enables easy and fast access to the
guest files.
 The system provides better data management
facilities.
 The system provides security measures to access to
the hotel’s info lowering data security threats
 Easy update of the guest records.
 Reduction of data entry and processing errors.
 Greatly reduce paper use at the hotel
Page | 8

PYTHON CODE

#MYSQL CONNECTIVITY AND CUSTOMER DETAILS


import mysql.connector
import random
roomrent = restaurentbill = gamingbill = fashionbill =
totalamount = 0

# MODULE TO CHECK MYSQL CONNECTIVITY


def MYSQLconnectionCheck():
global myConnection
userName = input("\nENTER MYSQL SERVER'S USERNAME: ")
password = input("\nENTER MYSQL SERVER'S PASSWORD: ")
try:
myConnection = mysql.connector.connect(
host="localhost",
user=userName,
passwd=password,
database="HotelManagement",
auth_plugin='mysql_native_password')
if myConnection.is_connected():
print("Connected to MySQL Server successfully")
return myConnection

except mysql.connector.Error as err:


print(f"Error: {err}")
return None
Page | 9

def addCustomer():
global myConnection
if myConnection:
try:
cursor = myConnection.cursor()
cid = input("Enter Customer Identification Number: ")
name = input("Enter Customer Name: ")
age = input("Enter Customer's Age: ")
nationality = input("Enter Customer's Nationality: ")
phoneno = input("Enter Customer's Phone Number: ")
email = input("Enter Customer's Email: ")
sql = "INSERT INTO C_Details (cid, name, age, nationality,
phoneno, email) VALUES (%s, %s, %s, %s, %s, %s)"
values = (cid, name, age, nationality, phoneno, email)
cursor.execute(sql, values)
myConnection.commit()
print("\nNew Customer Entered In The System
Successfully")

except mysql.connector.Error as err:


print(f"Error: {err}")

finally:
cursor.close()
else:
print("Failed to connect to MySQL Server")
P a g e | 10

#BOOKING RECORD
def searchcustomer(cid):
global myConnection
if myConnection:
try:
cursor = myConnection.cursor()
sql = "SELECT * FROM C_Details WHERE cid = %s"
cursor.execute(sql, (cid,))
customer = cursor.fetchone()
P a g e | 11

cursor.close()
if customer:
print("Customer found")
return customer
else:
print("Customer not found")
return None
except mysql.connector.Error as err:
print(f"Error: {err}")
return None
else:
print("Failed to connect to MySQL Server")
return None

def bookingrecord(cid):
global myConnection
if searchcustomer(cid):
if myConnection:
try:
cursor = myConnection.cursor()
createTable = """CREATE TABLE IF NOT EXISTS
BOOKING_RECORD(
CID VARCHAR(20),
CHECK_IN DATE,
CHECK_OUT DATE
)"""
cursor.execute(createTable)
P a g e | 12

checkin = input("\nEnter Customer Check-IN Date


[YYYY-MM-DD]: ")
checkout = input("\nEnter Customer Check-OUT Date
[YYYY-MM-DD]: ")
sql = "INSERT INTO BOOKING_RECORD (CID, CHECK_IN,
CHECK_OUT) VALUES (%s, %s, %s)"
values = (cid, checkin, checkout)
cursor.execute(sql, values)
myConnection.commit()
print("\nCHECK-IN AND CHECK-OUT ENTRY MADE
SUCCESSFULLY")
except mysql.connector.Error as err:
print(f"\nError: {err}")
finally:
cursor.close()
else:
print("\nERROR ESTABLISHING MYSQL CONNECTION")
else:
print("\nCustomer not found")
P a g e | 13

#ROOM RENT
def roomRent(cid):
global myConnection
global roomrent
if searchcustomer(cid):
if myConnection:
try:
cursor = myConnection.cursor()
createTable = """CREATE TABLE IF NOT EXISTS
ROOM_RENT(
CID VARCHAR(20),
ROOM_CHOICE INT,
NO_OF_DAYS INT,
ROOMNO INT,
ROOMRENT INT
)"""
cursor.execute(createTable)
print("\n#### We Have The Following Rooms For You
####")
P a g e | 14

print("1. Budget ----> $1300")


print("2. Elite ----> $1800")
print("3. Royal ----> $2300")
print("4. Ultra Royal ----> $2800")
room_choice = int(input("Enter Your Choice: "))
no_of_days = int(input("For How Many Days You Want
To Stay: "))
roomno = random.randint(100, 425)
roomrent = 0
if room_choice == 1:
roomrent = 1300 * no_of_days + 180
elif room_choice == 2:
roomrent = 1800 * no_of_days + 180
elif room_choice == 3:
roomrent = 2300 * no_of_days + 230
elif room_choice == 4:
roomrent = 2800 * no_of_days + 280
else:
print("Invalid Room Choice")
return
sql = "INSERT INTO ROOM_RENT (CID, ROOM_CHOICE,
NO_OF_DAYS, ROOMNO, ROOMRENT) VALUES (%s, %s, %s, %s,
%s)"
values = (cid, room_choice, no_of_days, roomno,
roomrent)
cursor.execute(sql, values)
myConnection.commit()

print(f"\nTHANK YOU! Room booked successfully! Total


room rent is: ${roomrent}")
P a g e | 15

print("Your Room number is", roomno)

except mysql.connector.Error as err:


print(f"\nError: {err}")

finally:
cursor.close()
else:
print("\nERROR ESTABLISHING MYSQL CONNECTION")
else:
print("\nCustomer not found")

#RESTAURENT BILLING
P a g e | 16

def Restaurent(cid):
global myConnection
global restaurentbill
if searchcustomer(cid):
if myConnection:
try:
cursor = myConnection.cursor()
createTable = """CREATE TABLE IF NOT EXISTS
RESTAURENT(
CID VARCHAR(20),
CUISINE VARCHAR(30),
QUANTITY VARCHAR(30),
BILL INT
)"""
cursor.execute(createTable)
print("""
1. Vegetarian Combo --> $350
2. Non-Vegetarian Combo --> $500
3. Snacks Combo --> $200
4. Veg and Non-Veg Combo --> $750
5. Veg+Non-Veg+Snacks --> $850
""")
cuisine_choice = int(input("Enter Your Choice: "))
quantity = int(input("Enter Quantity: "))
restaurentbill = 0
if cuisine_choice == 1:
restaurentbill = 350 * quantity + 85
elif cuisine_choice == 2:
P a g e | 17

restaurentbill = 500 * quantity + 85


elif cuisine_choice == 3:
restaurentbill = 200 * quantity + 85
elif cuisine_choice == 4:
restaurentbill = 750 * quantity + 85
elif cuisine_choice == 5:
restaurentbill = 850 * quantity + 85
else:
print("Invalid Cuisine Choice")
return

sql = "INSERT INTO RESTAURENT (CID, CUISINE,


QUANTITY, BILL) VALUES (%s, %s, %s, %s)"
values = (cid, cuisine_choice, quantity, restaurentbill)
cursor.execute(sql, values)
myConnection.commit()

print(f"\nTHANK YOU! Your order has been placed


successfully! Total bill is: ${restaurentbill}")

except mysql.connector.Error as err:


print(f"\nError: {err}")

finally:
cursor.close()
else:
print("\nERROR ESTABLISHING MYSQL CONNECTION")
else:
print("\nCustomer not found")
P a g e | 18

#GAMING DETAILS
def Gaming(cid):
global myConnection
global gamingbill
if searchcustomer(cid):
if myConnection:
try:
cursor = myConnection.cursor()
createTable = """CREATE TABLE IF NOT EXISTS GAMING(
CID VARCHAR(20),
GAMES VARCHAR(30),
P a g e | 19

HOURS INT,
GAMING_BILL INT
)"""
cursor.execute(createTable)
while True:
print("""
1. PS5/PS4/Xbox -->$350
2. VR Games -->$450
3. Table Tennis -->$150
4. Bowling -->$100
5. Snooker -->$250
6. Swimming Pool Games -->$400""")
game_choice = int(input("Enter Your Choice: "))
hours = int(input("Enter Hours: "))
if game_choice == 1:
gamingbill += 350 * hours + 30
elif game_choice == 2:
gamingbill += 450 * hours + 30
elif game_choice == 3:
gamingbill += 150 * hours + 30
elif game_choice == 4:
gamingbill += 100 * hours + 30
elif game_choice == 5:
gamingbill += 250 * hours + 30
elif game_choice == 6:
gamingbill += 400 * hours + 30
else:
print("Invalid Game Choice")
P a g e | 20

continue

sql = "INSERT INTO GAMING (CID, GAMES, HOURS,


GAMING_BILL) VALUES (%s, %s, %s, %s)"
values = (cid, game_choice, hours, gamingbill)
cursor.execute(sql, values)
myConnection.commit()
print(f"\nTHANK YOU! Your gaming session has been
booked! Total gaming bill so far is: ${gamingbill}")
more_games = input("Do you want to book more
gaming sessions? (y/n): ")
if more_games.lower() != 'y':
break

except mysql.connector.Error as err:


print(f"\nError: {err}")

finally:
cursor.close()
else:
print("\nERROR ESTABLISHING MYSQL CONNECTION")
else:
print("\nCustomer not found")
P a g e | 21

#SHOPPING
def Fashion(cid):
global myConnection
global fashionbill
if searchcustomer(cid):
if myConnection:
try:
cursor = myConnection.cursor()
createTable = """CREATE TABLE IF NOT EXISTS
FASHION(
CID VARCHAR(20),
ITEM VARCHAR(30),
QUANTITY VARCHAR(30),
FASHION_BILL INT
)"""
cursor.execute(createTable)
while True:
print("""
1. Shirts/T-Shirts -->$250
2. Pants -->$200
3. Jeans -->$400
4. Leather Jacket -->$700
5. Gown -->$300
6. Cosmetic Kit -->$300
P a g e | 22

7. Trousers -->$40
8.Footwear -->$80
9.Accessories -->$50
""")
item_choice = int(input("Enter Your Choice: "))
quantity = int(input("Enter Quantity: "))
if item_choice == 1:
fashionbill += 250 * quantity + 60
elif item_choice == 2:
fashionbill += 200 * quantity + 60
elif item_choice == 3:
fashionbill += 400 * quantity + 60
elif item_choice == 4:
fashionbill += 700 * quantity + 60
elif item_choice == 5:
fashionbill += 300 * quantity + 60
elif item_choice == 6:
fashionbill += 300 * quantity + 60
elif item_choice == 7:
fashionbill += 40 * quantity + 60
elif item_choice == 8:
fashionbill += 80 * quantity + 60
elif item_choice == 9:
fashionbill += 50 * quantity + 60
else:
print("Invalid Item Choice")
continue
P a g e | 23

sql = "INSERT INTO FASHION (CID, ITEM, QUANTITY,


FASHION_BILL) VALUES (%s, %s, %s, %s)"
values = (cid, item_choice, quantity, fashionbill)
cursor.execute(sql, values)
myConnection.commit()
more_items = input("Do you want to buy more
items? (y/n): ")
if more_items.lower() != 'y':
break
print(f"\nTHANK YOU! Your purchase has been
successful! Total fashion bill so far is: ${fashionbill}")

except mysql.connector.Error as err:


print(f"\nError: {err}")

finally:
cursor.close()
else:
print("\nERROR ESTABLISHING MYSQL CONNECTION")
else:
print("\nCustomer not found")

#TOTAL AMOUNT
def totalamount(cid):
global roomrent, restaurentbill, fashionbill, gamingbill,
totalamount
if searchcustomer(cid):
P a g e | 24

totalamount = roomrent + restaurentbill + gamingbill +


fashionbill
print("\n\t\t\t ****** HOTEL KAER MORHEN ******")

print("____________________________________________________________
_")
print("\n\t\t\t****** CUSTOMER DETAILS ******")
customer_details = searchcustomer(cid)
if customer_details:
print(f"\nCustomer Name: {customer_details[1]}")
print(f"Customer Age: {customer_details[2]}")
print(f"Customer Nationality: {customer_details[3]}")
print(f"Customer Phone Number: {customer_details[4]}")
print(f"Customer Email: {customer_details[5]}")
print(f"\nRoom Rent: ${roomrent}")
print(f"Restaurant Bill: ${restaurentbill}")
print(f"Gaming Bill: ${gamingbill}")
print(f"Fashion Boutique Bill: ${fashionbill}")
print(f"Total Amount: ${totalamount}")
else:
print("\nCustomer not found")

#MAIN FUNCTION
if __name__ == "__main__":
myConnection = MYSQLconnectionCheck()
P a g e | 25

if myConnection:
while True:
print("""
1. Add Customer
2. Search Customer
3. Record Booking
4. Room Rent
5. Restaurant Bill
6. Gaming Bill
7. Fashion Boutique Bill
8. Total Bill
9. Exit""")
choice = int(input("Enter Your Choice: "))
if choice == 1:
addCustomer()
elif choice == 2:
cid = input("Enter Customer Identification Number: ")
searchcustomer(cid)
elif choice == 3:
cid = input("Enter Customer Identification Number: ")
bookingrecord(cid)
elif choice == 4:
cid = input("Enter Customer Identification Number: ")
roomRent(cid)
elif choice == 5:
cid = input("Enter Customer Identification Number: ")
Restaurent(cid)
elif choice == 6:
P a g e | 26

cid = input("Enter Customer Identification Number: ")


Gaming(cid)
elif choice == 7:
cid = input("Enter Customer Identification Number: ")
Fashion(cid)
elif choice == 8:
cid = input("Enter Customer Identification Number: ")
totalamount(cid)
elif choice == 9:
print("Exiting the system. Thank you!")
break
else:
print("Invalid Choice! Please try again.")
myConnection.close()

CUSTOMER BOOKING DETAILS


P a g e | 27
P a g e | 28

ROOM RENT

RESTAURENT BILL
P a g e | 29
P a g e | 30

GAMING BILL
P a g e | 31

SHOPPING BILL
P a g e | 32

TOTAL BILL

MYSQL DATABASES AND TABLES


USED IN THIS PROJECT
P a g e | 33

DATABASES:

TABLE STRUCTURE 1 AND 2


P a g e | 34

TABLE STRUCTURE 3 AND 4

TABLE STRUCTURE 5 AND 6


P a g e | 35

TABLE STRUCTURE 7

BACKEND DATA GENERATED THROUGH


SOFTWARE
P a g e | 36

#Customer Details

#Booking Record and Room Rent


P a g e | 37

#Fashion and Gaming

#Restaurent Bill
P a g e | 38

#Total Amount

**** END OF PROJECT ****


P a g e | 39

CONCLUSION
HOTEL MANAGEMENT SYSTEM is a Web-portal
Development Company specializing in providing custom
solutions for small businesses. We Strive to build
solutions to your specific needs to get the job done
right the first time. We pay special attention to the ease
of use and utilize the latest in technology.
This system is developed for the exclusively for the
people. It provides facilities to the user with user
friendly modules with sub modules. This system is
developed in understandable approach which can be
easier to the layman of the computers. This system is
developed totally GUI based and with smart links.

This project is designed to meet the requirements of


Online Hotel Management. It has been developed in
JSP, Servlets keeping in mind the specifications of the
system. For designing the system, we have used simple
data flow diagrams.
Overall, the project teaches us the essential skills like:
Using system analysis and design techniques like data
flow diagram in designing the system. Understanding
the database handling and query processing.
P a g e | 40

BIBLIOGRAPHY

 Computer Science with Python – Class XII


by Sumita Arora

 https://www.w3resource.com

https://en.wikipedia.org/wiki/
E_(mathematical_constant)

 https://cbsetoday.com

 https://www.academia.edu/

You might also like