You are on page 1of 38

KENDRIYA VIDYALAYA THIRUVANNAMALAI

COMPUTER SCIENCE INVESTIGATORY PROJECT

SUbMITTED bY:-
S DHANUSH RAJ
CLASS xII (2021-22)
ROLL NO:-

1
TABLE OF CONTENTS
Certificate

Acknowledgement

Synopsis

System Requirements

Introduction

About Python & MySQL

Database Design

Coding

Outputs

Bibliography

2
Certificate

This is to certify that S DHANUSH RAJ of class XII


Science, Kendriya Vidyalaya Thiruvannamalai, have
successfully completed his project in computer science
practical for the AISSCE as prescribed by CBSE in the
year 2021-22.
Date :
Roll No. :

_____________________
Signature of Principal

___________________ ___________________
Signature of Internal Signature of External
Examiner Examiner

3
Acknowledgement

It would be my utmost pleasure to express my sincere


thanks to my Principal Dr. Reema Stella Jayachandran
madam for her valuable guidance and motivation. I
would also give my sincere thanks to my Computer
Science Teacher Mr. D K Jaiswal sir, for providing a
helping hand in this project. His valuable guidance,
support and supervision all through this project titled
“ Hotel Management System ” , are responsible for
attaining its present form. This project has been made
not only for fetching marks but also for knowledge.
Finally, I would like to thank CBSE for giving me this
opportunity to undertake this project.

____________________
(Signature of Student)

S DHANUSH RAJ

4
SYNOPSIS
The title of the project is “Hotel Management
System”. It works on different aspects and day to day
operations of a hotel. This project is written in
Python programming language. It can be executed
through software which supports the specific language
(like IDLE, CANOPY, ETC).
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/she can use all those available features easily
without any restriction. It is too easy to use, he/she
can check the total cost of staying in the hotel easily
with each and every detail.
Talking about the features of this Simple Hotel
Management System, at first, the user has to enter
his/her data. It includes the name of the user,
address, check-in, and check-out dates. The user can
5
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 in order to calculate room
rent. This simple system also contains other functions
such as calculating restaurant, laundry and game bill.
When the user selects to calculate restaurant bill, the
system displays a small menu. From there the user
has to select foods and then it displays the total
restaurant bill. The other remaining features;
calculating laundry and game bill also follow the same
procedure as of calculating restaurant bill.
At last, after all these calculations the user can know
about their total cost of staying easily. In this feature,
the system provides his/her 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.

6
The main reason I chose this topic as my project is to
provide single platform for performing various kind
of operations of a hotel. To prepare this project we
will use basics of python modules and functions.
This perform will be containing GUI (graphical user
interface) named “TKINTER”. This will give the
graphical interface to the user and make a good look.
We have decided that this project should be easily
used by the user so it will be user friendly.
This project will be containing many functions for
doing particular tasks which are needed in the
program. We have planned to add more updates in
future to make it more efficient. We will try our best
to make the project good and satisfy the user.

7
SYSTEM REQUIREMENTS

HARDWARE REQUIRED

 Printer, to print the required documents of the


project
 Pen Drive
 Processor : AMD
 Ram : 4 GB
 Hard Disk : 1 TB.

SOFTWARE REQUIRED

 Operating system : Windows 10


 Python 3.6.5 – IDLE
 MySQL
 MS Word, for presentation

8
INTRODUCTION
“Hotel Management System” is an application
developed for all devices where python is
downloaded. This project is designed in a versatile
manner such that it is compatible to provide different
options for the user in terms of logical and
mathematical operations.
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/she can use all those available features easily
without any restriction. It is too easy to use, he/she
can check the total cost of staying in the hotel easily
with each and every detail.
Talking about the features of this Simple Hotel
Management System, at first, the user has to enter
his/her data. It includes the name of the user,
address, check-in, and check-out dates. The user can
9
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 in order to calculate room
rent. This simple system also contains other functions
such as calculating restaurant, laundry and game bill.
When the user selects to calculate restaurant bill, the
system displays a small menu. From there the user
has to select foods and then it displays the total
restaurant bill. The other remaining features;
calculating laundry and game bill also follow the same
procedure as of calculating restaurant bill.
At last, after all these calculations the user can know
about their total cost of staying easily. In this feature,
the system provides his/her 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.
EXISTING SYSTEM:
10
The current manual system uses paperwork and
direct human language communication by mouth to
manage the hotel. This delays information
transmission in the hotel. Booking is done through
phone calls or through visit to the hotel booking
office. The guest’s personal details such as Name,
Age, Nationality, and Duration of stay, are input
during booking in. The booking office orders for
preparation of the guest’s room before his/ her check
in date.
The documents are transferred manually to the filling
department for compilation of the guest’s file. On the
reporting date the file is transferred to the reception.
On checking in the guest is given the key to his
allocated room, he also specifies if he needs room
service.
The receptionist hands over the guest’s file to the
accountant on the next table. Here the guest pays
accommodation and meals fee. The guest’s file is
updated on daily basis of his expenditure costs. The
accounts department generates the bills on daily basis
and delivered to the guests in their rooms at dusk by
the service maids. The guest pays at the accounts
11
desk, where the receipts are generated. For a one
meal customer the bill is generated immediately after
ordering and he pays at the accountant desk before
leaving. During checking out of guests, their
expenditure outlines are generated a day before
check outdate. The guests receive their outlines at the
accounts desk as they check out, where they pay for
bills balances if any.
DISADVANTAGES OF EXISTING SYSTEM
 Guest files can easily get lost or mix up with
other guest file documents.
 Files occupy a large storage space.
 Unnecessary duplication of data.
 Files are prone to theft unauthorized
modification due to low data security levels and
standards.
 Due to easy access to guest data by
unauthorized users, guest data is extremely
unconfident.
 Retrieval of guest records is extremely
difficult.
 Data entry procedure is prone to errors.
12
 Guest records are extremely difficult to
modify since modification generates dirty and
unpresentable reports.
PROPOSED SYSTEM:
In our proposed system, 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 each and every
detail. It also manages the bill of the customer
felicitously without any mismatches.

ADVANTAGES OF PROPOSED SYSTEM


 The system enables easy and fast access to
the guest files.
 The system provides better data management
facilities.

13
 The system provides security measures to
access to the hotel’s information lowering
data security threats.
 Easy update of the guest records.
 Reduction of data entry and processing
errors.
 Greatly reduce paper use at the hotel.

14
ABOUT PYHTON & MySQL

Python is an interpreted language as python programs


are executed by an interpreter. Thus, Python
interpreter should be installed on the computer
system to write and run python programs. We have
also learnt that Python IDLE (Integrated
Development and Learning Environment) provides
two working modes interactive mode (popularly
known as python shell) and script mode.

SQL (Structured Query Language) is a standard


language for accessing and manipulating database.
SQL commands are used to create, transform and
retrieve information from Relational Database
Management System (RDMS) and to create an
interface between user and database. By using SQL
commands, one can search for any data, remove
rows, drop table etc.

15
Database Design

In the program we have sqlite3 function for using


database queries in the program. In this program
we have used database for Name of the person,
Gender, Age, Address, Contacts. Then this will
be stored in the database calling it in the function
of the database command. The users will be
asked their details to be filled. We have make
the program that no detail should be empty every
detail should be filled according to it.

TAbLE: Member

16
CODING
# HOTEL MANAGEMENT SYSTEM
class hotelfarecal:
def
__init__(self,rt='',s=0,p=0,r=0,t=0,a=1800,name='',
address='',cindate='',coutdate='',rno=101):

print ("\n\n*****WELCOME TO
HEWING HOTEL*****\n")
self.rt=rt
self.r=r
self.t=t
self.p=p
self.s=s
self.a=a
self.name=name
self.address=address

17
self.cindate=cindate
self.coutdate=coutdate
self.rno=rno
def inputdata(self):
self.name=input("\nEnter your name:")
self.address=input("\nEnter your address:")
self.cindate=input("\nEnter your check in
date:")
self.coutdate=input("\nEnter your checkout
date:")
print("Your room no.:",self.rno,"\n")

def roomrent(self):#sel1353
print ("We have the following rooms for
you:-")
print ("1. type A---->rs 6000 PN\-")
print ("2. type B---->rs 5000 PN\-")

18
print ("3. type C---->rs 4000 PN\-")
print ("4. type D---->rs 3000 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")
self.s=6000*n
elif (x==2):
print ("you have opted room type B")
self.s=5000*n
elif (x==3):
print ("you have opted room type C")
self.s=4000*n
elif (x==4):
print ("you have opted room type D")

19
self.s=3000*n
else:
print ("please choose a room")
print ("your room rent is =",self.s,"\n")
def restaurentbill(self):
print("*****RESTAURANT MENU*****")
print("1.water----->Rs20","2.tea-----
>Rs10","3.breakfast combo--->Rs90","4.lunch----
>Rs110","5.dinner--->Rs150","6.Exit")

while (1):
c=int(input("Enter your choice:"))
if (c==1):
d=int(input("Enter the quantity:"))
self.r=self.r+20*d
elif (c==2):
d=int(input("Enter the quantity:"))
self.r=self.r+10*d
20
elif (c==3):
d=int(input("Enter the quantity:"))
self.r=self.r+90*d
elif (c==4):
d=int(input("Enter the quantity:"))
self.r=self.r+110*d
elif (c==5):
d=int(input("Enter the quantity:"))
self.r=self.r+150*d
elif (c==6):
break;
else:
print("Invalid option")
print ("Total food Cost=Rs",self.r,"\n")
def laundrybill(self):

21
print("******LAUNDRY
MENU*******")
print ("1.Shorts----->Rs3","2.Trousers-----
>Rs4","3.Shirt--->Rs5","4.Jeans---->Rs6","5.Girlsuit-
-->Rs8","6.Exit")
while (1):
#brought to you by code-projects.org
e=int(input("Enter your choice:"))
if (e==1):
f=int(input("Enter the quantity:"))
self.t=self.t+3*f
elif (e==2):
f=int(input("Enter the quantity:"))
self.t=self.t+4*f
elif (e==3):
f=int(input("Enter the quantity:"))
self.t=self.t+5*f

22
elif (e==4):
f=int(input("Enter the quantity:"))
self.t=self.t+6*f
elif (e==5):
f=int(input("Enter the quantity:"))
self.t=self.t+8*f
elif (e==6):
break;
else:
print ("Invalid option")

print ("Total Laundary Cost=Rs",self.t,"\n")


def gamebill(self):
print ("******GAME MENU*******")

print ("1.Table tennis----->Rs60","2.Bowling---


-->Rs80","3.Snooker--->Rs70","4.Video games----
>Rs90","5.Pool--->Rs50==6","6.Exit")
23
while (1):

g=int(input("Enter your choice:"))


if (g==1):
h=int(input("No. of hours:"))
self.p=self.p+60*h
elif (g==2):
h=int(input("No. of hours:"))
self.p=self.p+80*h
elif (g==3):
h=int(input("No. of hours:"))
self.p=self.p+70*h
elif (g==4):
h=int(input("No. of hours:"))
self.p=self.p+90*h
elif (g==5):
h=int(input("No. of hours:"))

24
self.p=self.p+50*h
elif (g==6):
break;
else:
print ("Invalid option")

print ("Total Game Bill=Rs",self.p,"\n")


def display(self):
print ("******HOTEL BILL******")
print ("Customer details:")
print ("Customer name:",self.name)
print ("Customer address:",self.address)
print ("Check in date:",self.cindate)
print ("Check out date",self.coutdate)
print ("Room no.",self.rno)
print ("Your Room rent is:",self.s)
print ("Your Food bill is:",self.r)

25
print ("Your laundary bill is:",self.t)
print ("Your Game bill is:",self.p)
self.rt=self.s+self.t+self.p+self.r
print ("Your sub total bill is:",self.rt)
print ("Additional Service Charges is",self.a)
print ("Your grandtotal bill
is:",self.rt+self.a,"\n")
self.rno+=

def main():

a=hotelfarecal()

while (1):
print("1.Enter Customer Data")

print("2.Calculate rommrent")

26
print("3.Calculate restaurant bill")
print("4.Calculate laundry bill")
print("5.Calculate gamebill")
print("6.Show total cost")
print("7.EXIT")
b=int(input("\nEnter your choice:"))
if (b==1):
a.inputdata()
if (b==2):
a.roomrent()
if (b==3):
a.restaurentbill()
if (b==4):
a.laundrybill()
if (b==5):

27
a.gamebill()
if (b==6):
a.display()

if (b==7):
quit()
main()

28
OUTPUTS
1.

29
2.

30
3.

31
4.

32
5.

33
6.

34
7.

35
8.

36
9.

37
BIBLIOGRAPHY

1. www. python.org
2. www.mysql.com
3. www.google.com
4. Computer Science with Python by
Preeti Arora.
5. Computer Science with Python by
Sumita Arora.

38

You might also like