You are on page 1of 20

COMPUTER SCIENCE PROJECT

Sector 19, Nanda Enclave, Dwarka, Delhi, 110075

NAME: Lakshay Madhok


CLASS: XII
SECTION: D
BOARD ROLL NO:
ACADEMIC YEAR: 2021-2022
CERTIFICATE
This is to certify that Master Lakshay Madhok of
class XII-D has successfully completed the Computer
Science project on the topic “HOTEL MANAGEMENT
SYSTEM” under the guidance of Ms. Nisha during
the academic year 2021-22.

_____________ ______________
INTERNAL EXAMINER PRINCIPAL

_____________ _____________

DATE EXTERNAL EXAMINER


ACKNOWLEGMENT
I would like to express my special thanks of
gratitude to my teacher Ms. Nisha as well as our
principal Mrs. Sheelu Mathew who gave me
golden opportunity to do this project of
Computer Science, which also helped me in
doing a lot of research and I came to know new
things about it. Without their help, guidance and
support it would be impossible to complete this
project.
Secondly, I would also like to thank my parents
who helped me a lot in finishing this project
within limited time. I am making this project not
only for marks but also to increase my
knowledge.
Once again thanks to all who helped me in
doing this project.

3
INDEX
CONTENT DATE SIGN
Certificate 28-02-22
Acknowledgement 28-02-22
Advantages of 28-02-22
project

Disadvantages of 28-02-22
project

Synopsis

Source code 28-02-22

Output 28-02-22
Bibliography 28-02-22
ADVANTAGES OF
PROJECT
1. Save time on admin tasks
The right hotel management software will vastly cut down
the time you spend on manual administrative tasks. The
software does the majority of the work and lets you divert
your time to more important tasks, such as serving your
guests.

2. Increase your online visibility


The right software is an important factor in developing
your online presence. You can integrate guest-facing
software like hotel booking engines, chat bots and a guest
portal with your website design, enabling you to instantly
accept online reservations and make guests feel confident
in their choice to book directly with you.

3. Prevent double bookings and manual errors


Hospitality management software systems are
programmed to avoid double bookings and overbookings.
Thanks to task automation, they also help prevent errors
when front desk staff are inputting important customer
data like name, passport details, and card numbers.This
means a better guest experience.
DISADVANTAGES OF
PROJECT
Guest
1. If there is a power failure while making a reservation, all the information
has to be given again

2. If there is a power cut while there is a check-in or check-out, the guest


need to wait for full server start up.

Staff
1. If one staff mistypes the information than the guest might get angry

2. If there is a power failure, while making a reservation than the staff


must redo the whole reservation.

3. When night auditing is being done all other user's must be logged off

4. If there is a virus attack the stored information can be corrupt and the
wrong information may be given to the guest .

Hotel
1. All the staff needs to be trained on the software

2. The software needs to be renewed each year

3. High risk of virus attack as the systems are connected to the internet
most of the time

4. If there is a virus attack the stored information might get corrupt


5. If there is a power failure, the hotel runs a high risk of loosing all the
stored information

6. Most cities / countries do not have local support. Support is possible


via online only and sometimes it takes time.

BACKGROUND OF THE PROJECT


The Hotel management system has been developed to
override the problems prevailing in practicing manual
systems. This system is designed for the particular need of
the company to carry out operations in a smooth and
effective manner. The application is reduced as much as
possible to avoid errors while entering the data. The aim is
to automate its existing manual system by the help of
computerized equipment and full fledged computer
software, fulfilling their requirements so that their valuable
data/information can be stored for a longer period with
easy accessing and manipulation of the same. It may help
collect perfect management in detail. In a very short time,
the collection will be obvious, simple and sensible.
MODULES
import mysql.connector:
By importing this package, we are able
to establish the connection between
SQL and Python.
import datetime:
This package provides basic functions
for display date related values in the
program.
import random:
This package has functionality to generate
random numbers and select numbers
within a range.
FUNCTIONS
connect():
This function establishes connection between
Python and MySQL.
cursor():
It is a special control structure that facilitates
the row-by-row processing of records in the
result set.
The syntax is:
<cursor object>=<connection object>.cursor()
execute():
This function is use to execute the sql query
and retrieve records using python.
The syntax is:
<cursor object>.execute(<sql query string>)
fetchall():

This function will return all the rows from the


result set in the form of a tuple containing the
records.
commit():
This function provides changes in the
database physically.
FLOW OF PROJECT
FIRSTLY, we have done the planning in a paper work
regarding what have to do on the assigned project HOTEL
MANAGEMENT SYSTEM.

SECONDLY, we discussed our planning with our subject


teacher and then he provided us the right path to perform
the work.

NEXT, we started our project on foot paths of our


Subject teacher.

THEN, we started our coding, coding took around 2 and


half months for completion.

NEXT, we analyzed the mistakes done and then we

corrected them.

THEN, we prepared the project format as shown above.

THANKS TO ALL OF WORTHY TEACHERS AND PRINCIPAL


AND MY DEAR GROUP MATES ALSO A GREAT
THANKS TO ST. MARY’S SCHOOL DWARKA FOR
PROVIDING US THIS GOLDEN OPPORTUNITY
System Requirements of the
Project

Recommended System Requirements

Processors: Intel® Core™ i3 processor 4300M at 2.60 GHz. Disk

space: 2 to 4 GB.

Operating systems: Windows® 10, MACOS, and UBUNTU. Python

Versions: 3.X.X or Higher.

Minimum System Requirements

Processors: Intel Atom® processor or Intel® Core™ i3 processor. Disk

space: 1 GB.

Operating systems: Windows 7 or later, MACOS, and UBUNTU. Python

Versions: 2.7.X, 3.6.X.

Prerequisites before installing MySQL Connector Python

You need root or administrator privileges to perform the


installation process.

Python must be installed on your machine.

Note: – MySQL Connector Python requires python to be in the system’s PATH.


Installation fails if it doesn’t find Python.

On Windows, If Python doesn’t exist in the system’s PATH, please


manually add the directory containing python.exe yourself.
import mysql.connector
import datetime
mydb = mysql.connector.connect(user='root',
password='1234',host='localhost',database='hotel2')
mycursor=mydb.cursor()
def Runcode():
mycursor.execute('create table if not exists roomtype(Room char(10),Rate_per_night
int(10))')
sql = "INSERT INTO roomtype(Room,Rate_per_night) VALUES (%s, %s)"
val = [
('Type A', 1000),
('Type B', 2000),
('Type C', 3000),
('Type D', 4000),
]
mycursor.executemany(sql, val)
mydb.commit
def Runcode1():
mycursor.execute('create table if not exists restaurent(Itum char(20),Price int(10))')
sql = "INSERT INTO restaurent(Itum,Price) VALUES (%s, %s)"
val = [
('Tea',10),
('Coffee', 10),
('Cold drink', 20),
('Samosa', 10),
('Sandwich', 50 ),
('Dhokla', 30 ),
('Noodles', 50),
('Milk', 20 ),
('PINGU Tea', 204 ),
('Pasta', 50),
]
mycursor.executemany(sql, val)
mydb.commit
def Runcode2():
mycursor.execute('create table if not exists laundary(itum char(20),price int) ')
sql = "INSERT INTO laundary(Itum,Price) VALUES (%s, %s)"
val = [
('1.Shirt',100),
('2.Trouser', 100),
('3.Ladies suit', 150),
('4.Saree', 200),
('5.Other', 200 ),
]
mycursor.executemany(sql, val)
mydb.commit

def registercust():
mycursor.execute('create table if not exists custdata(custname varchar(25),addr
varchar(50),indate date,outdate date)')
name=input("enter name:")
addr=input("enter address:")
indate=input("enter check in date:")
outdate=input("enter check out date:")
sql="insert into
custdata(custname,addr,indate,outdate)values('{}','{}','{}','{}')".format(name,addr,indate,ou
tdate)
mycursor.execute(sql)
mydb.commit()
def roomtypeview():
print("Do you want to see room type available : Enter 1 for yes :")
ch=int(input("enter your choice:"))
if ch==1:
sql="select * from roomtype"
mycursor.execute(sql)
rows=mycursor.fetchall()
for x in rows:
print(x)
def roomrent():
print ("We have the following rooms for you:-")
print ("1. type A---->rs 1000 PN\-")
print ("2. type B---->rs 2000 PN\-")
print ("3. type C---->rs 3000 PN\-")
print ("4. type D---->rs 4000 PN\-")
x=int(input("Enter Your Choice Please->"))
n=int(input("For How Many Nights Did You Stay:"))
if(x==1):
print ("you have opted room type A")
s=1000*n
elif (x==2):
print ("you have opted room type B")
s=2000*n
elif (x==3):
print ("you have opted room type C")
s=3000*n
elif (x==4):
print ("you have opted room type D")
s=4000*n
else:
print ("please choose a room")
print ("your room rent is =",s,"\n")
def restaurentmenuview():
print("Do you want to see menu available : Enter 1 for yes :")
ch=int(input("enter your choice:"))
if ch==1:
sql="select * from restaurent"
mycursor.execute(sql)
rows=mycursor.fetchall()
for x in rows:
print(x)
def orderitem():
print("Do you want to see menu available : Enter 1 for yes :")
ch=int(input("enter your choice:"))
if ch==1:
sql="select * from restaurent"
mycursor.execute(sql)
rows=mycursor.fetchall()
for x in rows:
print(x)
print("do you want to purchase from above list:enter your choice:")
d=int(input("enter your choice:"))
if(d==1):
print("you have ordered tea")
a=int(input("enter quantity"))
s=10*a
print("your amount for tea is :",s,"\n")
elif (d==2):
print("you have ordered coffee")
a=int(input("enter quantity"))
s=10*a
print("your amount for coffee is :",s,"\n")
elif(d==3):
print("you have ordered colddrink")
a=int(input("enter quantity"))
s=20*a
print("your amount for colddrink is :",s,"\n")
elif(d==4):
print("you have ordered samosa")
a=int(input("enter quantity"))
s=10*a
print("your amount fopr samosa is :",s,"\n")
elif(d==5):
print("you have ordered sandwich")
a=int(input("enter quantity"))
s=50*a
print("your amount for sandwich is :",s,"\n")
elif(d==6):
print("you have ordered dhokla")
a=int(input("enter quantity"))
s=30*a
print("your amount for dhokla is :",s,"\n")
elif(d==7):
print("you have ordered noodles")
a=int(input("enter quantity"))
s=50*a
print("your amount for noodles is :",s,"\n")
elif(d==8):
print("you have ordered milk")
a=int(input("enter quantity"))
s=20*a
print("your amount for milk is :",s,"\n")
elif(d==9):
print("you have ordered PINGU Tea")
a=int(input("enter quantity"))
s=204*a
print("your amount for PINGU tea is :",s,"\n")
elif(d==10):
print("you have ordered pasta")
a=int(input("enter quantity"))
s=50*a
print("your amount for pasta is :",s,"\n")
else:
print("please enter your choice from the menu")
def laundarybill():
print("Do you want to see rate for laundary : Enter 1 for yes :")
ch=int(input("enter your choice:"))
if ch==1:
sql="select * from laundary"
mycursor.execute(sql)
rows=mycursor.fetchall()
for x in rows:
print(x)
x=int(input("Enter your choice of cloth please ->"))
n=int(input('How many clothes you want to get washed'))
if (x==1):
print('You want to get Shirt washed ')
s=75*n
elif (x==2):
print('You want to get Trouser washed ')
s=100*n
elif (x==3):
print('You want to get Ladies suit washed ')
s=150*n
elif (x==4):
print('You want to get Saree washed ')
s=200*n
elif (x==5):
print('You want to get Other clothes washed ')
s=200*n
else:
print ('PLEASE CHOOSE A Piece of cloth')
print('your laundry charges are Rs. =',s,'\n')

def Menuset():
print("enter 1: To enter customer data")
print("enter 2 : To view roomtype")
print("enter 3 : for calculating room bill")
print("enter 4 : for viewing restaurent menu")
print("enter 5 : for restaurent bill")
print("enter 6 :for laundary bill")
print("enter 7 : for exit:")
print(“enter 8: if running the code for first time “)
try:
userinput=int(input("please select an above option:"))
except ValueError:
exit("\n hi thats not a number")

if(userinput==1):
registercust()
elif(userinput==2):
roomtypeview()
elif(userinput==3):
roomrent()
elif(userinput==4):
restaurentmenuview()
elif(userinput==5):
orderitem()
elif(userinput==6):
laundarybill()
elif(userinput==7):
print('Thanks for visiting')
quit()
elif(userinput==8):
Runcode()
Runcode1()
Runcode2()
else:
print("enter correct choice")
Menuset()
def runagain():
runagn=input("\n want to run again y/n:")
while(runagn.lower()=='y'):
Menuset()
if (runagn.lower()=='n'):
exit()
runagain()

SOURCE CODE
BIBLOGRAPHY
1.COMPUTER SCIENCE TEXTBOOK CLASS 12:
SUMITA ARORA
2.https://www.google.com
3.https://www.python.org.in
4.https://www.mysql.org
5.https://www.tutorialaicsip.com
6.https://www.mews.com/en/blog/advantages-of-
hotel-management-system

You might also like