Computer Project
Computer Project
2
This is to certify that JINEA SAHA , a student of class XII
I, has successfully completed the project titled
“INTEGRATED HOTEL MANAGEMENT SYSTEM” in the
Computer Lab during the Year 2023-2024 for the
A.I.S.S.C.E Computer Science Examination– 2024.
It is further certified that this project is the team work
of the Candidate.
External Examiner
Internal Examiner
DATED:
SEAL:
3
I extend my heartfelt gratitude to our Computer Science
Teacher - Mrs. Dhrita Adhya for her valuable guidance
and supervision throughout the project work. I am also
utmost indebted to all my team mates for their
encouragement, help, suggestion and readily helpful
service in the successful completion of the project.
JINEA SAHA
4
SL. NO. TOPIC PAGE
NO.
1. Certificate 3
2. Acknowledgement 4
3. Hardware and software 6
requirements
4. Features of the 7-8
proposed system
5. Modules and function 9-10
used and their
purposes
6. Source Code 11-28
7. Output Screens 29-34
8. Limitations 35
9. Bibliography 36
5
Intel® Core™ i3 processor, 4300 M at
2.60 GHz.
3 GB
50 MB
requires python to be in
the system’s path. Installation fails if it does not find
Python.
6
The program provides an interactive computer-
based system to the customers of a particular hotel.
The program enables the customers to avail the
various facilities offered by the hotel. It also helps
the hotel to maintain all records in a systematic
manner.
8
PREDEFINED MODULES USED :-
mysql.connector
9
roomRent() : Allows the user to select his desired
room from the displayed choices, accepts the
number of days the user needs the room for and
prints the total room rent.
10
import mysql.connector
myConnnection =""
cursor=""
userName=""
password =""
roomrent =0
restaurantbill=0
gamingbill=0
carbill=0
totalAmount=0
cid=""
global myConnection
global userName
global password
11
myConnection=mysql.connector.connect(host="localhost",user=userN
ame,passwd=password , auth_plugin='mysql_native_password' )
if myConnection:
myConnection.commit()
cursor.close()
return myConnection
else:
global userName
global password
global myConnection
global cid
myConnection=mysql.connector.connect(host="localhost",user=user
Name,passwd=password ,
database="HMS" , auth_plugin='mysql_native_password' )
if myConnection:
return myConnection
12
else:
myConnection.close()
def userEntry():
global cid
if myConnection:
cursor=myConnection.cursor()
VARCHAR(30),C_ADDRESS VARCHAR(30),C_AGE
VARCHAR(30),C_COUNTRY VARCHAR(30),P_NO
VARCHAR(30),C_EMAIL VARCHAR(30))"
cursor.execute(createTable)
print("----------------------------------------------------------------------------------------")
cursor.execute(sql,values)
myConnection.commit()
13
print("\nNew Customer Entered In The System Successfully.
print("----------------------------------------------------------------------------------------")
cursor.close()
else:
def bookingRecord():
global cid
customer=searchCustomer()
if customer:
if myConnection:
cursor=myConnection.cursor()
BOOKING_RECORD(CID VARCHAR(20),CHECK_IN
cursor.execute(createTable)
print()
print("----------------------------------------------------------------------------------------")
DD ] : ")
MM-DD ] : ")
values= (cid,checkin,checkout)
cursor.execute(sql,values)
14
myConnection.commit()
SUCCESSFULLY !")
print("----------------------------------------------------------------------------------------")
cursor.close()
else:
def roomRent():
global cid
customer=searchCustomer()
if customer:
global roomrent
if myConnection:
cursor=myConnection.cursor()
ROOM_RENT(CID VARCHAR(20),ROOM_CHOICE
cursor.execute(createTable)
print()
print("----------------------------------------------------------------------------------------")
print ("\n *---* We have The Following Rooms For You *---*")
15
print()
if roomchoice==1:
elif roomchoice==2:
elif roomchoice==3:
elif roomchoice==4:
else:
cursor.execute(sql,values)
myConnection.commit()
16
print("----------------------------------------------------------------------------------------")
cursor.close()
else:
def Restaurant():
global cid
customer=searchCustomer()
if customer:
global restaurantbill
if myConnection:
cursor=myConnection.cursor()
RESTAURENT(CID VARCHAR(20),CUISINE
cursor.execute(createTable)
print()
print("----------------------------------------------------------------------------------------")
17
if choice_dish==1:
elif choice_dish==2:
elif choice_dish==3:
else:
values= (cid,choice_dish,quantity,restaurantbill)
cursor.execute(sql,values)
myConnection.commit()
print("----------------------------------------------------------------------------------------")
cursor.close()
else:
18
def Gaming():
global cid
customer=searchCustomer()
if customer:
global gamingbill
if myConnection:
cursor=myConnection.cursor()
VARCHAR(20),GAMES VARCHAR(30),HOURS
VARCHAR(30),GAMING_BILL VARCHAR(30))"
cursor.execute(createTable)
print()
print("----------------------------------------------------------------------------------------")
^_^_^_^_^")
print("""
7. Exit
""")
print()
19
game=int(input("Enter Which Game You Want To Play : "))
print()
if game==1:
elif game==2:
elif game==3:
elif game==4:
elif game==5:
Games")
20
gamingbill = hour * 350
else:
values= (cid,game,hour,gamingbill)
cursor.execute(sql,values)
myConnection.commit()
print("----------------------------------------------------------------------------------------")
cursor.close()
else:
def Sightseeing():
global cid
customer=searchCustomer()
if customer:
global carbill
if myConnection:
cursor=myConnection.cursor()
21
createTable ="CREATE TABLE IF NOT EXISTS
VARCHAR(30),CARBILL VARCHAR(30))"
cursor.execute(createTable)
print()
print("----------------------------------------------------------------------------------------")
print("""
""")
if car==1:
print("\nSwift Dzire")
carbill = hr*300
elif car==2:
print("\nToyota Fortuner")
carbill = hr*400
elif car==3:
print("\nInnova Crysta")
carbill = hr*500
elif car==4:
print("\nKia Seltos")
22
carbill = hr*700
elif car==5:
print("\nVolkswagen Virtus")
carbill = hr*850
else:
values= (cid,car,hr,carbill)
cursor.execute(sql,values)
myConnection.commit()
print("\n\n###########################################
######")
TOUR!!!" )
print("----------------------------------------------------------------------------------------")
cursor.close()
else:
23
def totalAmount():
global cid
customer=searchCustomer()
if customer:
global grandTotal
global roomrent
global restaurantbill
global carbill
global gamingbill
if myConnection:
cursor=myConnection.cursor()
INT,TOTALAMOUNT INT)"""
cursor.execute(createTable)
values= (cid,name,roomrent,restaurantbill ,
gamingbill,carbill,grandTotal)
cursor.execute(sql,values)
myConnection.commit()
cursor.close()
print()
24
print("----------------------------------------------------------------------------------------")
*^*^*^*")
print("___________________________________________________")
#-#-#")
print("----------------------------------------------------------------------------------------")
cursor.close()
else:
def searchCustomer():
global cid
if myConnection:
cursor=myConnection.cursor()
25
sql="SELECT * FROM C_DETAILS WHERE CID= %s"
cursor.execute(sql,(cid,))
data=cursor.fetchall()
print()
print("----------------------------------------------------------------------------------------")
if data:
for i in data:
print(i,end="")
print()
print("----------------------------------------------------------------------------------------")
return True
else:
return False
cursor.close()
else:
myConnection = MYSQLconnectionCheck ()
if myConnection:
MYSQLconnection ()
while(True):
print()
print("----------------------------------------------------------------------------------------")
26
print("""
2--->Booking Record
9--->EXIT """)
print("----------------------------------------------------------------------------------------")
if choice == 1:
userEntry()
bookingRecord()
roomRent()
Restaurant()
Gaming()
Sightseeing()
searchCustomer()
27
elif choice ==8:
totalAmount()
break
else:
else:
28
29
CHOICES DISPLAYED :
30
STORING BOOKING RECORDS :
LODGING SECTOR :
31
FOOD SECTOR :
GAMING SECTOR :
32
CAR RENTAL FOR SIGHTSEEING :
33
PAYMENT GATEWAY :
ENTER 9 TO EXIT :
34
It does not provide the customer a visual
representation of the various services offered by
the hotel.
35
Computer Science for class XII by Sumita
Arora
www.Stackoverflow.com
www.Geeksforgeeks.org
36