Project on Hotel Management (1) (4)
Project on Hotel Management (1) (4)
Project on Hotel Management (1) (4)
A PROJECT REPORT
ON
HOTEL
MANAGEME
NT SYSTEM
FOR AISSCE 2020 EXAMINATION
[AS A PART OF THE COMPUTER SCIENCE
COURSE (083)]
SUBMITTED BY: -
NAME: _________________
ROLLNO.:_________________
UNDER THE GUIDANCE OF:
Ms…………………..
PGT (COMP.SC)
1
HOTEL MANAGEMENT SYSTEM
CERTIFICATE
………………………… ……………………………..
Signature of Student Signature of
Teacher/Guide
2
HOTEL MANAGEMENT SYSTEM
ACKNOWLEDGEMENT
I
, undertook this Project work, as the part of my XII-
Computer Science course(083). I had tried to apply my
best of knowledge and experience, gained during the
study and class work experience. However, developing
software system is generally a quite complex and time-
consuming process. It requires a systematic study, insight
vision and professional approach during the design and
development. Moreover, the developer always feels the
need, the help and good wishes of the people near you, who
have considerable experience and idea.
_______________
Class XII
3
HOTEL MANAGEMENT SYSTEM
C O N T E N T S
1. Introduction-----------------------------------------------------------------5
3. System Implementation-------------------------------------------------9
4. Theoretical Background---------------------------------10
6. Output----------------------------------------------------------------------32
7. User Manual---------------------------------------------------------------39
8. References ----------------------------------------------------------------41
4
HOTEL MANAGEMENT SYSTEM
1. Introduction
functionaries.
the database for easy access and interface to the database. Using
5
HOTEL MANAGEMENT SYSTEM
Course(083).
6
HOTEL MANAGEMENT SYSTEM
7
HOTEL MANAGEMENT SYSTEM
9
HOTEL MANAGEMENT SYSTEM
3. System Implementation
10
HOTEL MANAGEMENT SYSTEM
4. Theoretical Background
Installing Python:
It can be installed by using website :
https://www.python.org/downloads/
11
HOTEL MANAGEMENT SYSTEM
Using IDLE
13
HOTEL MANAGEMENT SYSTEM
the file in write mode. This is because, sometimes the last lap of data remains in
buffer and is not pushed on to disk until a close() operation is performed.
To find and retrieve just the data that meets conditions you
specify, including data from multiple tables, create a query. A
query can also update or delete multiple records at the same
time, and perform built-in or custom calculations on your data.
14
HOTEL MANAGEMENT SYSTEM
18
HOTEL MANAGEMENT SYSTEM
19
HOTEL MANAGEMENT SYSTEM
Table Design:
The database of HOTEL MANAGEMENT SYSTEM contains 4
tables in database Library. The tables are normalized to minimize
the redundancies of data and enforcing the validation rules of the
organization. Most of the tables are designed to store master
records. The tables and their structure are given below:
DBMS: MySQL
Host: localhost , root User:, Psswd:dps , DataBase: class12
20
HOTEL MANAGEMENT SYSTEM
21
HOTEL MANAGEMENT SYSTEM
22
HOTEL MANAGEMENT SYSTEM
25
HOTEL MANAGEMENT SYSTEM
26
HOTEL MANAGEMENT SYSTEM
27
HOTEL MANAGEMENT SYSTEM
PYTHON CODE :
import os
import platform
import mysql.connector
import pandas as pd
import datetime
global z
mydb = mysql.connector.connect(user='root', password='h', host='localhost', database='hotel')
mycursor=mydb.cursor()
def registercust():
L=[]
name=input("ENTER NAME:")
L.append(name)
addr=input("ENTER ADDRESS:")
L.append(addr)
indate=input("ENTER CHECK IN DATE:")
L.append(indate)
outdate=input("ENTER CHECK OUT DATE:")
L.append(outdate)
cust=(L)
sql="insert into custdata(name,addr,indate,outdate)values(%s,%s,%s,%s)"
mycursor.execute(sql,cust)
mydb.commit()
def roomtypeview():
print("Do YOY 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:"))
28
HOTEL MANAGEMENT SYSTEM
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 YOY WANT TO SEE MEBU 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():
global s
print("DO YOY WANT TO SEE MEBU 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):
29
HOTEL MANAGEMENT SYSTEM
30
HOTEL MANAGEMENT SYSTEM
else:
print("PLEASE ENTER YOUR CHOICE FROM THE MENU")
def laundarybill():
global z
print("Do yoy 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
def lb():
print(z)
def res():
print(s)
def viewbill():
a=input("ENTER CUSTOMER NAME:")
print("CUSTOMER NAME :",a,"\n")
print("LAUNDAREY BILL:")
print(lb)
print("RESTAURENT BILL:")
print(res)
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 COMPLETE BILL")
print("ENTER 8 : FOR EXIT:")
try:
userinput=int(input("PLEASE SELECT AN ABOVE OPTION:"))
except ValueError:
exit("\n HI THATS NOT A NUMBER")
userinput=int(input("ENTER YOUR CHOICE"))
if(userinput==1):
31
HOTEL MANAGEMENT SYSTEM
registercust()
elif(userinput==2):
roomtypeview()
elif(userinput==3):
roomrent()
elif(userinput==4):
restaurentmenuview()
elif(userinput==5):
orderitem()
elif(userinput==6):
laundarybill()
elif(userinput==7):
viewbill()
elif(userinput==8):
quit()
else:
print("ENTER CORRECT CHOICE")
Menuset()
def runagain():
runagn=input("\n WANT TO RUN AGAIN y/n:")
while(runagn.lower()=='y'):
if(platform.system()=="windows"):
print(os.system('cls'))
else:
print(os.system('clear'))
Menuset()
runagn=input("\n WANT TO RUN AGAIN Y/N:")
runagain()
32
HOTEL MANAGEMENT SYSTEM
33
HOTEL MANAGEMENT SYSTEM
34
HOTEL MANAGEMENT SYSTEM
35
HOTEL MANAGEMENT SYSTEM
36
HOTEL MANAGEMENT SYSTEM
37
HOTEL MANAGEMENT SYSTEM
38
HOTEL MANAGEMENT SYSTEM
39
HOTEL MANAGEMENT SYSTEM
7. User Manual
Hardware Requirement-
Intel Pentium/Celeron or similar processor based PC at Client/Server end.
128 MB RAM and 4GB HDD space (for Database) is desirable.
Standard I/O devices like Keyboard and Mouse etc.
Printer is needed for hard-copy reports.
Local Area Network(LAN) is required for Client-Server Installation
Software Requirement-
Windows 2000/XP OS is desirable.
NetBeans Ver 5.1 or higher should be installed with JDK and JVM.
MySQL Ver 6.1 with Library Database must be present at machine.
Database Installation-
The software project is distributed with a backup copy of a Database named class12
with required tables. Some dummy records are present in the tables for testing
purposes, which can be deleted before inserting real data. The project is shipped with
manav.SQL file which installs a database and tables in the computer system.
Note: The PC must have MySQL server with user (root) and password (h) . If root
password is any other password, it can be changed by running MySQL Server Instance
Configure Wizard.
Start Program MySQL MySQL Server MySQL Server Instance Config Wizard
Provide current password of root and new password as “h” , this will change the root
password.
40
HOTEL MANAGEMENT SYSTEM
To install a MySQL database from a dump file (khn.sql) , simply follow the following
steps.
Step 1: Copy the manav.sql file in C:\Program files\Mysql\MySql server 5.1\Bin
folder.
Step 2: Open MySQL and type the following command to create the database named
class12.
mysql> create database class12;
Step 3: Open Command Window (Start Run cmd)
Step 4: Go to the following folder using CD command of DOS.
C:\Program files\Mysql\MySql server 5.1\Bin>
Step 5: type the following command on above prompt -
C:….\bin> mysql -u root -khn class12 <ais.sql
This will create a class12 database with required tables.
41
HOTEL MANAGEMENT SYSTEM
8.References
In order to work on this project titled – HOTEL MANAGEMENT SYSTEM, the following
books and literature are referred by me during the various phases of development of
the project:
– Gruber
(3) http://www.mysql.org/
(4) http://www.python.org/
Other than the above-mentioned books, the suggestions and supervision of my teacher
and my classmates also helped me to develop this software project.
42