You are on page 1of 49

VELAMMAL VIDHYASHRAM

SURAPET

COMPUTER SCIENCE PROJECT

Topic:

Hotel reservation management

NAME: Vishal.p
CLASS: 12A4
ROLL NUMBER:

SSCE 2023 - 2024


BONAFIDE CERTIFICATE

This is to certify that this COMPUTER SCIENCE Project on the topic

"Hotel reservation management” has been successfully completed by (Vishal.p)

of class 12A4, Roll.no…………………... at Velammal Vidhyashram, Surapet, for the

partial fulfilment of Computer Science Practical examination conducted by

Senior School Certificate Examination-CBSE, New Delhi for the academic Year 2023- 2024.

Date: ……………………..

Signature of Principal Teacher incharge

Signature of the Signature of the


Internal Examiner External Examiner

ACKNOWLEDGEMENT

Apart from the efforts taken by me , the success of the 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 deep sense of gratitude to almighty God for giving me the strength to
complete the project successfully.
I express my heartfelt gratitude to my parents for the constant encouragement while
carrying out this project.

I express my deep sense of gratitude to the luminary, the Principal of Velammal


Vidhyashram , who has been continuously motivating and extending a helping hand to us.

My sincere thanks to Mr./Ms. kalaichelvi a guide, mentor, above all a friend, who
critically reviewed my project and guided me during the implementation of the project.

The guidance and support received from all the members who contributed , was vital
for the success of the project. I am grateful for their constant support and help.

Signature of the Student


4
TABLE OF CONTENT

SNO TOPIC PAGE NO

01 ABSTRACT 5

02 SYSTEM CONFIGURATION 6

03 INTRODUCTION 7

04 OBJECTIVES OF THE PROJECT 7

05 PROPOSED SYSTEM 8

06 LIBRARIES AND FUNCTIONS USED 9

07 MYSQL QUERIES USED IN THE PROJECT 10

08 SOURCE CODE 11

09 OUTPUT (SCREENSHOTS) 21

10 CONCLUSION 31

11 BIBLIOGRAPHY 31
6
ABSTRACT

The main objective of this program is to help the travelers to get the

complete information about room booking with all the required details. This

booking can be done through online. This is a desktop based program

where the management of entire hotel is customized. The hotel

management system is using python as front end and Mysql server as the

secured backend database. The ultimate motto of this project is to help the

travelers to get all the information about room prices, room’s availability,

food, laundry, games and other necessary information for room booking.

This project helps the users to carry this task online easily.

5
8
SYSTEM CONFIGURATION

HARDWARE CONFIGURATION

Microsoft windows 7 professional/windows 8/windows 8.2:

• Processor : Intel Core i3 or equivalent


• Memory : 2 GB (32-bit), 4 GB (64-bit)
• Disk space : 1.5 GB of free disk space

SOFTWARE REQUIREMENTS
• 1 GB RAM (2 GB+ recommended)
• 9-58 GB free hard disk space depending on edition and
configuration, including space required for temporary files

• DVD-ROM drive (if installing from a Media Kit DVD)


• Basic GPU – Any vendor DirectX 9.0 class or better (Pixel Shader
Level 2)

• Intel® Pentium® or compatible, 1.6 GHz minimum (2GHz+


recommended)

• 1024x768 or higher-resolution monitor

• MOUSE OR OTHER POINTING DEVICE


10
INTRODUCTION:
This Project on Hotel Reservation Management is a general software
developed (using python and mysql ) to simplify hotel operations by
automating them. In this Project “Hotel Taj” is the project’s hotel name. It
covers the major aspects of hotel management, it could perform the
following operations- Hotel room booking, provide the details of the hotel
rooms, informing about the food availability, Laundry and Billing.

OBJECTIVE OF THE PROJECT:


The objective of this project is to let the students apply the programming
knowledge into a real- world situation/problem and exposed the
students how programming skills helps in developing a good software.

1. Write programs utilizing modern software tools.

2. Apply object oriented programming principles effectively when

developing small to medium sized projects.


3. Write effective procedural code to solve small to medium sized

problems.
4. Students will demonstrate a breadth of knowledge in computer

science, as exemplified in the areas of systems, theory and software


development.
5. Students will demonstrate ability to conduct a research or applied

Computer Science project, requiring writing and presentation skills


which exemplify scholarly style computer

PROPOSED SYSTEM

7
Today one cannot afford to rely on the fallible human beings of be
really wants to stand against today’s merciless competition where not to
wise saying “to err is human” no longer valid, it’s outdated to rationalize
your mistake. So, to keep pace with time, to bring about the best result
without malfunctioning and greater efficiency so to replace the unending
heaps of flies with a much sophisticated hard disk of the computer.

One has to use the data management software. Software has been
an ascent in atomization of various organizations. Many software products
working are now in markets, which have helped making the organizations
work easier and efficiently. Data management initially had to maintain a
lot of ledgers and a lot of paperwork has to be done but now software
product on this organization has made their work faster and easier. Now
only this software has to be loaded on the computer and work can be
done. This prevents a lot of time and money. The work becomes fully
automated and any information regarding the organization can be
obtained by clicking the button. Moreover, now it’s an age of
computers of and automating such an organization gives the better look.

12
13
LIBRARIES AND FUNCTIONS USED:

1. mysqlconnector - MySQL Connector/Python enables Python


programs to access MySQL databases, using an API that is compliant
with the
Python Database API Specification v2.0 (PEP 249). It is written in pure
Python and does not have any dependencies except for the Python
Standard Library.
2. random- The random module is a built-in module to generate the
pseudo-random variables. It can be used perform some action
randomly such as to get a random number, selecting a random
elements from a list, shuffle elements randomly, etc.
3. datetime-The datetime module supplies classes for manipulating
dates and times. While date and time arithmetic is supported, the
focus of the implementation is on efficient attribute extraction for
output formatting and manipulation.
4. Platform-The Platform module is used to retrieve as much possible
information about the platform on which the program is being
currently executed. Now by platform info, it means information about
the device, its OS, node, OS version, Python version, etc.
5. OS-The OS module in Python provides functions for creating and
removing a directory (folder), fetching its contents, changing and
identifying the current directory, etc.

14
15
USER DEFINED FUNCTIONS USED:

1. registercust() :Using this function we will accept all the new


customer details.

2. chooseroom() :Using this function the customer can choose the


required rooms and the price for the room is displayed.

3. restaurentmenuview() :Using this function the customer can view the


menu of our hotel.

4. orderitem() :Using this function the customer can choose the


desired food item.

5. laundrybill() :Using this function the customer can view the price of
the clothes

6. runagain() :Using this function the customer can again choose from
the menuset.

7. deletecust() :Using this function the customer can delete the


customer details.

MYSQL QUERIES USED IN THE PROJECT

• "insert into custdate(custname,addr,indate,outdate)

values('{}','{}','{}','{}')". format(name,addr,indate,outdate)"

• "select*from restaurant"

• "select * from restaurant"

• "select * from laundary"

16
17
SOURCE CODE

import os
import platform
import
datetime
import random
import mysql.connector

mydb=mysql.connector.connect(user='root',password='vishal'
host='localhost',database='hotel')
def registercust():
name=input("enter name:")
addr=input("enter address:")
indate=input("enter check in date:")
outdate=input("enter check out
date:")
sql="insert into custdate (custname,addr,indate,outdate)values
(‘{}’,’{}’,’{}’,’{}’)”.format(name,addr,indate,outdate)
mycursor=mydb.cursor() mycursor.execute(sql)
mydb.commit()

18
19
def deletecust():
cname=input(“enter customer name to be deleted:”)
csql=”delete from custdate where custname=cname”
mycursor.execute(csql) count=0 for custname in
mycursor:
count+=1
print(“Record deleted successfully”)
if count==0: print(“Record
not found”)
mydb.commit()
def chooseroom():
s=0
print('Available room types:')
print('1. Single room/rs 2000 per
night') print('2. Twin room/rs 3000 per
night') print('3. Deluxe/rs 5000 per
night')
print('4. Room with a view/rs 6500 per night')
print('5. Suite/rs 8000 per night')
choice=int(input('\nEnter your preferred choice:'))

20
21
if choice==1:
n=int(input('How many nights do you plan to
stay:')) print('You have opted a single room')
s=s+2000*n
room_no=random.randint(1,501)
print('Your room number is:',room_no)

if choice==2:
n=int(input('How many nights do you plan to
stay:')) print('You have opted a twin room')
s=s+3000*n
room_no=random.randint(501,1001)
print('Your room number is:',room_no)

if choice==3:
n=int(input('How many nights do you plan to
stay:')) print('You have opted a deluxe room')
s=s+5000*n
room_no=random.randint(1001,1501)
print('Your room number is:',room_no)

22
23
if choice==4:
n=int(input('How many nights do you plan to
stay:')) print('You have opted a room with a view')
s=s+6500*n
room_no=random.randint(1501,2001)
print('Your room number is:',room_no)

if choice==5:
n=int(input('How many nights do you plan to
stay:')) print('You have opted a suite room')
s=s+8000*n
room_no=random.randint(2001,2501)
print('Your room number is:',room_no)
print('\n Your room price is',s,'rs')

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 restaurant'
mycursor.execute(sql)
rows=mysql.fetchall()
print(x)

24
25
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
restaurant"
mycursor.execute(sql)
rows=mycursor.fetchall() for x
in rows:
print(x)
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("you amount for coffee is:",s,"\n")

26
27
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 for samosa is:",s,"\n")
elif d==5:
print("you have ordered
sandwich") a=int(input("enter
qunatity")) 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")

28
29
elif d==7:
print("you have ordered
kachori") a=int(input("enter
quantity")) s=10*a
print("your amount for kachori is :",s,"\n")
elif d==8:
print("you have ordered
milk") a=int(input("enter
quantity")) s=20*a
print("your amount for kachori is :",s,"\n")
elif d==9:
print("you have ordered
noodles") a=int(input("enter
quantity")) s=250*a
print("your amount for noodles is :",s,"\n")
elif d==10:
print("you have ordered
pasta") a=int(input("enter
quantity")) s=150*a
print("your amount for pasta is :",s,"\n")
else:
print("please enter your choice from the menu")

30
31
def laundarybill():
global z
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)
y=int(input("Enter Your number of clothes->"))
z=y*10
print("your laundary bill:",z,"\n")
return z
print("------WELCOME TO HOTEL TAJ ---- ")
print("DESCRIPTION")
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 tour of and learn about\

32
33
the rich history and architecture of this vibrant city, accompanied by
Government of India\
appointed and trained tourism officials. The hotel has a peaceful
environment and a good place to\
recreate and enjoy your vacation tours. Hotel Taj will provide all your
necessity things and we want\
to make you comfortable and fulfullied. If you are joining to stay with us,
just call to 456 from\
our room and we will satisfy your needs. Thanks for visting our hotel")
def Menuset():
print("\nEnter 1:To enter customer data")
print("Enter 2:To view roomtype with price")
print("Enter 3:For viewing restaurent
menu") print("Enter 4:For restaurent bill")
print("Enter 5:For laundary bill") print("Enter
6:To delete customer data:") print(“Enter
7:For exit:”) 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):
chooseroom()

34
35
elif(userinput==3):
restaurentmenuview()
elif(userinput==4):
orderitem()
elif(userinput==5):
laundarybill()
elif(userinput==6):
deletecust()
elif (userinput==7):
print(“Thanks for visting”)
else: print("Enter correct
choice")
Menuset() def
runagain():
runagn=input("Do you want to run again y/n:")
while(runagn.lower()=='y'):
if(platform.system()=="windows"):
p=0
else:
li=0
Menuset()
runagn=input("Do you want to run again y/n:")
runagain()

36
OUTPUT(SCREENSHOTS)

 To enter the customer details

37
 To add another customer details

 To view the type of room with price

38
 To view the restaurant bill

39
 To access the restaurant menu

40
 To view the laundary bill

41
 To delete the customer data

 To exit

42
MYSQL OUTPUT

 Create database and table custdate

 Details from custdate table

43
 Creating table restaurant and inserting values

 Details from laundary table

44
 Details from restaurant table

 Details before deleting a record

45
 Details after deleting a record

46
47
CONCLUSION:

The Hotel Management System was developed to replace the manual


process of booking a hotel room or any other facility of the hotel. Hotel
room reservation system makes easier you to book the rooms instantly and
your details is secured and we make it official. Your data is stored safe and
secure. It provides you with all the information regarding the room
booking.

Processing information will be faster. It guarantees accurate maintenance


of customer details. It easily reduces the book keeping task and thus
reduces the human effort and increases accuracy speed.

This computerized system store all the data in the database which makes it
easy to fetch and update whenever needed.

BIBILOGRAPHY:

Computer Science with Python by Sumita Arora for Class 11& 12

https://www.w3schools.com/PYTHON/showpython.asp?filename=demo_mysql_test

https://pythonspot.com/mysql-with-python/

https://www.tutorialspoint.com/PYTHON/PYTHON_DATABASE_ACCESS

48
49

You might also like