Ip Project Class 12
Ip Project Class 12
THE TAJ
HOTEL
MANAGMENT
CERTIFICATE
MANAGEMENT ”
OF SECONDARY EDUCATION.
SIGNATURE SIGNATURE
CLASS : XII E
INDEX
SL.NO. TOPIC
1. CERTIFICATE
2. ACKNOWLEDEGMENT
3. INTRODUCTION TO PROJECT
4. CODING
5. OUTPUTS
6. BIBLIOGRAPHY
INTRODUCTION
import mysql.connector
db=mysql.connector.connect(host='localhost',user='root',password='deepak')
mycursor=db.cursor()
mycursor.execute('create database if not exists HOTEL_MANAGEMENT')
db=mysql.connector.connect(host='localhost',user='root',password='deepak',database=
'HOTEL_MANAGEMENT')
mycursor=db.cursor()
db.commit()
def speciality():
db=mysql.connector.connect(host='localhost',user='root',password='deepak',database=
‘HOTEL_MANAGEMENT')
mycursor=db.cursor()
print("\nDESCRIPTION:")
print("The Taj Mahal Palace, Mumbai makes a wonderful starting point from which to\
discover the charms that bring people from around the globe flocking to Mumbai city,\
India’s commercial and entertainment capital. Around the corner from the hotel is Colaba\
Causeway - a vibrant stretch filled with roadside stores, jewellery shops, pubs and\
restaurants that whisks guests back in time to old Bombay. Take a tour of and learn about\
the rich history and architecture of this vibrant city, accompanied by Government of India\
appointed and trained tourism officials.Walk past Gothic buildings and through narrow\
streets.Visit historic locations such as Wellington Fountain, Regal Cinema, Indian Merchant\
Building, Asiatic Library, CSMVS Museum, Jehangir Art Gallery, Elphinstone College and\
other prominent buildings in varying styles of architecture, each symbolic of a particular\
period of Bombay’s social and commercial history.\n")
print("SERVICES:")
print("For the disabled, Breakfast, Restaurant, Adsl wi-fi internet, Fax, Newspapers,\
Transfer, Tourist information, Small animals welcome, Private parking,Guarded garage,\
24h reception, 24h bar, Beaches at 500 m, Shuttle bus stop for the airport only 10 minutes\
away.\n")
print("FACILITIES:")
print("ReceptionHall, Bar, Pool 10.00 a.m. –6.00 p.m.\n")
print("BOOKING:")
print("Excursions, Guided tours, Private parties")
mycursor.close()
db.close()
# Function, hotel fare calculator
# **********************************
def hotelfarecal():
while True :
print("\n")
print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
if (b=='1'):
z='y'
while (z=='y'):
inputdata()
if (z=='n'):
return hotelfarecal()
else :
print("Invalid Input!!")
z=input("\nDo you want to continue..(y/n):")
elif (b=='2'):
z='y'
while z=='y':
display()
If (z=='n'):
return hotelfarecal()
else :
print("Invalid Input!!")
z=input("\nDo you want to continue..(y/n):")
elif (b=='3'):
z='y'
while (z=='y'):
search()
if (z=='n'):
return hotelfarecal()
else :
print("Invalid Input!!")
z=input("\nDo you want to continue..(y/n):")
elif (b=='4'):
z='y'
while (z=='y'):
delete()
if (z=='n'):
return hotelfarecal()
else :
print("Invalid Input!!")
z=input("\nDo you want to continue..(y/n):")
elif (b=='5'):
z='y'
while (z=='y'):
update()
if (z=='n'):
return hotelfarecal()
else :
print("Invalid Input!!")
z=input("\nDo you want to continue..(y/n):")
elif (b=='6'):
break
else:
print("Invalid Input...... ")
# Inserting data
# ******************
import mysql.connector
import random
def inputdata():
r=0
l=0
p=0
s=0
db=mysql.connector.connect(host='localhost',user='root',password='deepak',database=
'HOTEL_MANAGEMENT')
mycursor=db.cursor()
print("\n")
# Choose Room for rent
# ***********************
while (1):
if (x==1):
s=s+6000*n
Room_no= random.randint(1,501)
elif (x==2):
Room_no= random.randint(501,1001)
s=s+4000*n
Room_no= random.randint(1001,1501)
elif (x==4):
Room_no= random.randint(1501,2001)
elif (x==5):
Room_no= random.randint(2001,2501)
elif (x==6) :
break
else:
if (c==1):
d=int(input("Enter the quantity:"))
r=r+20*d
elif (c==2):
elif (c==3):
elif (c==4):
elif (c==5):
d=int(input("Enter the quantity:"))
r=r+150*d
elif (c==6):
break
else:
print("Invalid option")
print ("\nTotal food Cost=Rs ",r)
# Choose Laundry Menu
# ***********************
print ("\n")
print ("******LAUNDRY MENU*******")
print ("1.Shorts----->Rs3","2.Trousers----->Rs4","3.Shirt--->Rs5","4.Jeans ----- >Rs6",\
"5.Girlsuit -- >Rs8","6.Next")
while (1):
e=int(input("\nEnter your choice:"))
if (e==1):
elif (e==2):
elif (e==3):
elif (e==4):
elif (e==5):
elif (e==6):
break
else:
print ("\n")
SubTotal_bill=s+r+l+p
Add_charges=1800
Room_rent=s
Game_bill=p
Food_bill=r
Laudry_bill=l
GrandTotal_bill=SubTotal_bill+Add_charges
data1=(Ccode,Cid_type,Cid_no,Cname,Ccontact_no,Cadd,Cindate,Coutdate,CNationality)
data2=(Ccode,Cname,Cadd,Cindate,Coutdate,Room_no,Room_rent,Food_bill,Laudry_bill,
Game_bill,SubTotal_bill,Add_charges,GrandTotal_bill)
mycursor.execute(cotm,data1)
mycursor.execute(rec,data2)
db.commit()
mycursor.close()
db.close()
# Show Details of Customer
# ****************************
def display():
print("\n")
print("1.Display all records")
print("2.Display through code number")
d=input("\nEnter your choice:")
if (d=='1'):
db=mysql.connector.connect(host='localhost',user='root',password='deepak',
database= 'HOTEL_MANAGEMENT')
mycursor=db.cursor()
qry=("select h.Ccode,h.Cname,h.Cadd,h.Cindate,h.Coutdate,h.Room_no,\
c.CNationality, c.Ccontact_no,c.Cid_type,c.Cid_no from hoteldata h, customer c\
where h.Ccode=c.Ccode")
mycursor.execute(qry)
for(Ccode,Cname,Cadd,Cindate,Coutdate,Room_no,CNationality, Ccontact_no,
Cid_type,Cid_no) in mycursor:
print ("\n")
print ("Customer details ....... ")
print ("Customer code:",Ccode)
print ("Customer name:",Cname)
print ("Customer Id type:",Cid_type)
print ("Customer Id Number:",Cid_no)
print ("Customer address:",Cadd)
print ("customer Nationality:",CNationality)
print ("Check in date:",Cindate)
print ("Check out date",Coutdate)
print ("Room number:",Room_no)
print ("Customer Contact number:",Ccontact_no)
print (" ")
mycursor.close()
print("\nIt's All record")
db.close()
elif (d=='2'):
db=mysql.connector.connect(host='localhost',user='root',password='deepak',
database='HOTEL_MANAGEMENT')
mycursor=db.cursor()
Ccode=input("\nEnter code of customer:")
qry=("select h.Ccode,h.Cname,h.Cadd,h.Cindate,h.Coutdate,h.Room_no,\
c.CNationality,c.Ccontact_no,c.Cid_type,c.Cid_no from hoteldata h, customer c\
where h.Ccode=c.Ccode and h.Ccode=%s")
rec_code=(Ccode,)
mycursor.execute(qry,rec_code)
rec_count=0
for(Ccode,Cname,Cadd,Cindate,Coutdate,Room_no,CNationality,Ccontact_no,
Cid_type,Cid_no) in mycursor:
rec_count+=1
print ('\nRecord Found...... ')
print ("Customer details ....... ")
print ("Customer code:",Ccode)
print ("Customer name:",Cname)
print ("Customer Id type:",Cid_type)
print ("Customer Id Number:",Cid_no)
print ("Customer address:",Cadd)
print ("customer Nationality:",CNationality)
print ("Check in date:",Cindate)
print ("Check out date",Coutdate)
print ("Room number:",Room_no)
print ("Customer Contact number:",Ccontact_no)
if (rec_count==0):
print("\nRecord not found!!")
db.commit()
mycursor.close()
db.close()
else :
print("Invalid Input!!")
# Search Customer
# *******************
def search():
db=mysql.connector.connect(host='localhost',user='root',password='deepak',database=
'HOTEL_MANAGEMENT')
mycursor=db.cursor()
def delete():
db=mysql.connector.connect(host='localhost',user='root',password='deepak',database=
'HOTEL_MANAGEMENT')
mycursor=db.cursor()
mycursor.execute(qry,del_rec)
mycursor.execute(qry1,del_rec)
rec_count=0
rec_count+=1
if rec_count==0:
print("\nRecord not Found!!")
print("Enter valid data")
db.commit()
mycursor.close()
db.close()
# Update Customer
# *******************
def update():
print("2.Customer Address")
if (c==1):
db=mysql.connector.connect(host='localhost',user='root',password='deepak',
database='HOTEL_MANAGEMENT')
mycursor=db.cursor()
data=(Cname,Ccode)
mycursor.execute(q,data)
q=('update customer set Cname=%s where Ccode=%s')
data=(Cname,Ccode)
mycursor.execute(q,data)
db.commit()
mycursor.close()
db.close()
elif (c==2):
db=mysql.connector.connect(host='localhost',user='root',password='deepak'
database='HOTEL_MANAGEMENT')
mycursor=db.cursor()
data=(Cadd,Ccode)
mycursor.execute(q,data)
data=(Cadd,Ccode)
mycursor.execute(q,data)
db.commit()
mycursor.close()
db.close()
elif (c==3):
db=mysql.connector.connect(host='localhost',user='root',password='deepak',
database='HOTEL_MANAGEMENT')
mycursor=db.cursor()
data=(Cindate,Ccode)
mycursor.execute(q,data)
data=(Cindate,Ccode)
mycursor.execute(q,data)
db.commit()
mycursor.close()
db.close()
elif (c==4):
db=mysql.connector.connect(host='localhost',user='root',password='deepak',
database='HOTEL_MANAGEMENT')
mycursor=db.cursor()
data=(Coutdate,Ccode)
mycursor.execute(q,data)
data=(Coutdate,Ccode)
mycursor.execute(q,data)
mycursor.close()
db.close()
elif (c==5):
db=mysql.connector.connect(host='localhost',user='root',password='deepak',
database='HOTEL_MANAGEMENT')
mycursor=db.cursor()
data=(Ccontact_no,Ccode)
mycursor.execute(q,data)
db.commit() mycursor.close()
db.close()
else :
print("Invalid Input!!")
print("\n\t\t\t\t\t\t\t\t ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░")
print("֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎\ ֎֎֎֎֎
֎֎֎֎֎░░ WELCOME TO THE TAJ PALACE░░֎֎֎֎֎֎֎֎֎ \
֎֎֎֎֎
֎֎֎֎֎֎֎֎֎ ֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎")
print("\t\t\t\t\t\t\t\t ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░")
while True:
print("\n")
print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
print("2.Customer Management")
print("4.EXIT")
print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
if (b=='1'):
speciality()
elif (b=='2'):
hotelfarecal()
elif (b=='3'):
party()
elif (b=='4'):
quit()
else:
print("Wrong Choice")
➢ Main screen of Hotel Mangemnet
➢ Speciality of Hotel
➢ Customer Management