Sample Project
Sample Project
1. INTRODUCTION...........................................................................2
2. OBJECTIVE....................................................................................3
3. EXISTING SYSTEM........................................................................4
4. PROPOSED SYSTEM.....................................................................4
5. HARDWARE SPECIFICATION........................................................5
6. SOFTWARE SPECIFICATION..........................................................5
7. SYSTEM DESIGN...........................................................................6
8. MODULES....................................................................................7
9. MODULE DESCRIPTION................................................................7
10.TABLE STRUCTURE.......................................................................8
11.DATABASE DICTIONARY...............................................................9
12.INSTALLING PYTHON AND MYSQL.............................................11
13.SOURCE CODE............................................................................15
14.OUTPUT.....................................................................................26
15.CONCLUSION.............................................................................35
16.BIBLIOGRAPHY...........................................................................36
1
1. INTRODUCTION
The Hotel Management system is to generalize and simplify the monthly or day
to day activities of Hotel like Room activities, check in of new customer, check
out of customer, assigning a room according to customer requirement, providing
customer with food, games, fashion store and finally compute the bill which has
to be performed repeatedly on regular basis. To provide efficient, fast, reliable
and user-friendly system is the basic motto behind this exercise.
This website aims at creating an Hotel Management system which can be used
by the managers to reserve hotel rooms, to order food, to shop dresses and to
play games. This website of hotel will remove the hectic task of managers and
executive for searching and booking rooms in hotel. The system will help the
administrative staff i.e., executive of the hotel to keep the daily and the history
record details of the customers in proper database.
2
2. OBJECTIVE
Creation of website is ideal solution for the hospitality industry that can be used
at hotels, motels, resorts, lodges, hostels, military guest houses, suits,
apartments and bed & breakfast operations.
The administrator will know the details of reservations and daily income. The
website avoids manual and repetitive work and provide real time information of
availability of rooms.
The main objective of the entire activity is to automate the process of day-to-
day activities of hotel like:
Admission of a new customer
Assign a room according to customer’s demand
Order food for the customer
Allot games as requested by customer
To generate bill for the dress purchased
Finally compute the bill
This website covers various aspects in hotel management and always performs
user friendly. It helps to ease staff with facilities for reservation process. It saves
the time which was wasting more and more in manual work.
3
3. EXISTING SYSTEM
The existing system is a manual one and there is lot of issues like erroneous
data, slow process, lack of security etc. Finding out the final payment amount
completely relies on the hotel manager and if he is absent, it takes a long time to
find out the details during check out and is prone to errors.
In the existing system the exams are done only manually but in proposed system
we have to computerize the exams using this application.
a) Lack of security of data.
b) More man power.
c) It is a time consuming.
d) Consumes large volume of pare work
e) Needs manual calculations.
f) No direct role for the higher officials
g) It is difficult to maintain bulk of record in manual
4. PROPOSED SYSTEM
4
5. HARDWARE SPECIFICATION
6. SOFTWARE SPECIFICATION
5
7. SYSTEM DESIGN
In this phase, a logical system is built which fulfils the given requirements.
Design phase of software development deals with transforming the client’s
requirements into a logically working system. Normally, design is performed in
the following two steps:
CUSTOMER
BOOKING RECORD ROOM DETAILS
DETAILS
RESTAURANT
DETAILS
FASHION STORE
TOTAL BILL GAMING DETAILS
DETAILS
6
8. MODULES
The modules used in this project are:
Customer details
Booking Record
Room rent
Restaurant Menu
Gaming details
Fashion store
9. MODULE DESCRIPTION
Customer details: This module maintains the overall activities and the
detailed information of the customer. This information includes customer’s
name, address, age, nationality, phone number and email address.
Booking Record: This module maintains the check in and check out dates of
the customers.
Room rent: This module deals with room enquiry and reservation. During
reservation, the details of the customers, type of room required and number
of rooms required are fed into the system. Customers can get the information
about the room rent and details of rooms and facilities available.
Restaurant bill: This module deals with the availability of food such as both
vegetarian and non-vegetarian. Restaurant module receives and process
information about the food item served in restaurant and through room
service. The Restaurant bill is generated based on the food items consumed
by the guest during his stay in the hotel.
Gaming bill: This module deals with the games selected by the customer and
generates the bill according to it.
Fashion store: This module deals with the clothes bought by the customer
and generates the bill according to it.
Bills and payment module: This module deals with the generation and
tracking of bills and payments. The lodging bill is calculated using the check
in and checkout details of the person.
7
10. TABLE STRUCTURE
8
11. DATABASE DICTIONARY
Table name: Customer Details
Description: Data about the customer
No Field name Data type Description
1. Customer ID Varchar(20) To store customer Identification number
2. Customer Name Varchar(30) To store customer Name
2. Address Varchar(250) To store customer Address
3. Age Int To store customer Age
4. Phno Varchar(30) To store customer Phone number
5. Email_id Varchar(30) To store customer Email id
9
Table name: Fashion store
Description: Information about fashion store
No Field name Data type Description
1. Customer ID Varchar(20) To store customer Identification number
2. Fashion Bill Varchar(20) To store the bill
10
13. SOURCE CODE
import mysql.connector
myConnnection =""
cursor=""
userName=""
password =""
roomrent =0
restaurentbill=0
gamingbill=0
fashionbill=0
totalAmount=0
cid=""
myConnection=mysql.connector.connect(host="localhost",user='root',passwd='J
essi2004', database="HotelDB" , auth_plugin='mysql_native_password' )
15
if myConnection:
return myConnection
else:
print("\nERROR ESTABLISHING MYSQL CONNECTION !")
myConnection.close()
def userEntry():
global cid
if myConnection:
cursor=myConnection.cursor()
createTable =("CREATE TABLE IF NOT EXISTS C_DETAILS(CID
VARCHAR(20)PRIMARY KEY,C_NAME VARCHAR(30)NOT
NULL,C_ADDRESS VARCHAR(250),C_AGE int(10) NOT
NULL ,C_COUNTRY VARCHAR(30),P_NO VARCHAR(30)
UNIQUE,C_EMAIL VARCHAR(30)NOT NULL)")
cursor.execute(createTable)
print('_'*100)
cid = input("Enter Customer Identification Number : ")
name = input("Enter Customer Name : ")
address = input("Enter Customer Address : ")
age= int(input("Enter Customer Age : "))
nationality = input("Enter Customer Country : ")
phoneno= input("Enter Customer Contact Number : ")
email = input("Enter Customer Email : ")
print('_'*100)
sql = ("INSERT INTO C_Details VALUES(%s,%s,%s,%s,%s,%s,%s)")
values= (cid,name,address,age,nationality,phoneno,email)
cursor.execute(sql,values)
cursor.execute("COMMIT")
print("\nNew Customer Entered In The System Successfully !")
print('*'*100)
cursor.close()
else:
print("\nERROR ESTABLISHING MYSQL CONNECTION !")
def bookingRecord():
global cid
customer=searchCustomer()
if customer:
if myConnection:
cursor=myConnection.cursor()
16
createTable =("CREATE TABLE IF NOT EXISTS
BOOKING_RECORD(CID VARCHAR(20) NOT NULL,CHECK_IN DATE
NOT NULL,CHECK_OUT DATE NOT NULL)")
cursor.execute(createTable)
checkin=input("\n Enter Customer CheckIN Date [ YYYY-MM-DD ] :
")
checkout=input("\n Enter Customer CheckOUT Date [ YYYY-MM-
DD ] : ")
sql= "INSERT INTO BOOKING_RECORD VALUES(%s,%s,%s)"
values= (cid,checkin,checkout)
cursor.execute(sql,values)
cursor.execute("COMMIT")
print("\nCHECK-IN AND CHECK-OUT ENTRY MADE
SUCCESSFULLY !")
cursor.close()
else:
print("\nERROR ESTABLISHING MYSQL CONNECTION !")
def roomRent():
global cid
customer=searchCustomer()
if customer:
global roomrent
if myConnection:
cursor=myConnection.cursor()
createTable =("CREATE TABLE IF NOT EXISTS ROOM_RENT(CID
VARCHAR(20) NOT NULL, ROOM_CHOICE INT NOT
NULL,NO_OF_DAYS INT NOT NULL,ROOMNO INT NOT NULL ,
ROOMRENT INT NOT NULL)")
cursor.execute(createTable)
print ("\n ##### We have The Following Rooms For You #####")
print (" \t\t1. Ultra Royal ----> 10000 Rs.")
print (" \t\t2. Royal ----> 5000 Rs. ")
print (" \t\t3. Elite ----> 3500 Rs. ")
print (" \t\t4. Budget ----> 2500 USD ")
print()
17
elif roomchoice==2:
roomrent = noofdays * 5000
print("\nRoyal Room Rent : ",roomrent)
elif roomchoice==3:
roomrent = noofdays * 3500
print("\nElite Royal Room Rent : ",roomrent)
elif roomchoice==4:
roomrent = noofdays * 2500
print("\nBudget Room Rent : ",roomrent)
else:
print("Sorry ,May Be You Are Giving Me Wrong Input, Please Try
Again !!! ")
return
else:
print("\nERROR ESTABLISHING MYSQL CONNECTION !")
def Restaurent():
global cid
customer=searchCustomer()
if customer:
global restaurentbill
if myConnection:
cursor=myConnection.cursor()
createTable =("CREATE TABLE IF NOT EXISTS
RESTAURENT(CID VARCHAR(20) NOT NULL,CUISINE VARCHAR(30)
NOT NULL, QUANTITY VARCHAR(30) NOT NULL,BILL VARCHAR(30)
NOT NULL)")
cursor.execute(createTable)
print("1. Vegetarian Combo -----> 300 Rs.")
print("2. Non-Vegetarian Combo -----> 500 Rs.")
print("3. Vegetarian & Non-Vegetarian Combo -----> 750 Rs.")
18
choice_dish = int(input("Enter Your Cusine : "))
quantity=int(input("Enter Quantity : "))
if choice_dish==1:
print("\nSO YOU HAVE ORDER: Vegetarian Combo ")
restaurentbill=(quantity * 300)
elif choice_dish==2:
print("\nSO YOU HAVE ORDER: Non-Vegetarian Combo ")
restaurentbill= (quantity * 500)
elif choice_dish==3:
print("\nSO YOU HAVE ORDER: Vegetarian & Non-Vegetarian
Combo ")
restaurentbill= (quantity * 750)
else:
print("Sorry ,May Be You Are Giving Me Wrong Input, Please Try
Again !!! ")
def Gaming():
global cid
customer=searchCustomer()
if customer:
global gamingbill
if myConnection:
cursor=myConnection.cursor()
createTable =("CREATE TABLE IF NOT EXISTS GAMING(CID
VARCHAR(20) NOT NULL,GAMING_BILL VARCHAR(30))")
cursor.execute(createTable)
while True:
print("""
1. Table Tennis -----> 150 Rs./HR
2. Bowling -----> 100 Rs./HR
19
3. Snooker -----> 250 Rs./HR
4. VR World Gaming -----> 400 Rs./HR
5. Video Games -----> 300 Rs./HR
6. Swimming Pool Games -----> 350 Rs./HR
7. Exit
""")
game=int(input("Enter What Game You Want To Play : "))
if game==1:
hour=int(input("Enter No Of Hours You Want To Play : "))
gamingbill+= hour * 150
elif game==2:
hour=int(input("Enter No Of Hours You Want To Play : "))
gamingbill+= hour * 100
elif game==3:
hour=int(input("Enter No Of Hours You Want To Play : "))
gamingbill+= hour * 250
elif game==4:
hour=int(input("Enter No Of Hours You Want To Play : "))
gamingbill+= hour * 400
elif game==5:
hour=int(input("Enter No Of Hours You Want To Play : "))
gamingbill+= hour * 300
elif game ==6:
hour=int(input("Enter No Of Hours You Want To Play : "))
gamingbill+= hour * 350
else:
break
def Fashion():
global cid
customer=searchCustomer()
if customer:
20
global fashionbill
if myConnection:
cursor=myConnection.cursor()
createTable =("""CREATE TABLE IF NOT EXISTS FASHION(CID
VARCHAR(20) NOT NULL,BILL VARCHAR(30))""")
cursor.execute(createTable)
while True:
print("""
1. Shirts -----> 1500 Rs.
2. T-Shirts -----> 300 Rs.
3. Pants -----> 2000 Rs.
4. Jeans -----> 4000 Rs.
5. Tassel top -----> 500 Rs.
6. Gown -----> 3000 Rs.
7. Western dress -----> 3000 Rs.
8. Skirts -----> 400 Rs.
9. Trousers -----> 200 Rs.
10. Exit
""")
dress=int(input("Enter your Choice of dress: "))
if dress==1:
quantity=int(input("How many you want to buy: "))
fashionbill+= quantity * 1500
elif dress==2:
quantity=int(input("How many you want to buy: "))
fashionbill+= quantity * 300
elif dress==3:
quantity=int(input("How many you want to buy: "))
fashionbill+= quantity * 2000
elif dress==4:
quantity=int(input("How many you want to buy: "))
fashionbill += quantity * 4000
elif dress==5:
quantity=int(input("How many you want to buy: "))
fashionbill += quantity * 500
elif dress==6:
quantity=int(input("How many you want to buy: "))
fashionbill = quantity * 3000
elif dress==7:
quantity=int(input("How many you want to buy: "))
fashionbill += quantity * 3000
elif dress==8:
21
quantity=int(input("How many you want to buy: "))
fashionbill = quantity * 400
elif dress==9:
quantity=int(input("How many you want to buy: "))
fashionbill += quantity * 200
else:
break
def totalAmount():
global cid
customer=searchCustomer()
if customer:
global grandTotal
global roomrent
global restaurentbill
global fashionbill
global gamingbill
if myConnection:
cursor=myConnection.cursor()
createTable =("""CREATE TABLE IF NOT EXISTS TOTAL(CID
VARCHAR(20),C_NAME VARCHAR(30),ROOMRENT
INT ,RESTAURENTBILL INT , GAMINGBILL INT,FASHIONBILL
INT,TOTALAMOUNT INT)""")
cursor.execute(createTable)
sql= "INSERT INTO TOTAL VALUES(%s,%s,%s,%s,%s,%s,%s)"
name = input("Enter Customer Name : ")
grandTotal=roomrent + restaurentbill + fashionbill + gamingbill
values= (cid,name,roomrent,restaurentbill ,
gamingbill,fashionbill,grandTotal)
cursor.execute(sql,values)
cursor.execute("COMMIT")
22
cursor.close()
print("\n **** JESAN HOTEL **** CUSTOMER BIILING ****")
print("\n CUSTOMER NAME : " ,name)
print("\nROOM RENT : Rs. ",roomrent)
print("\nRESTAURENT BILL : Rs. ",restaurentbill)
print("\nFASHION BILL : Rs. ",fashionbill)
print("\nGAMING BILL : Rs. ",gamingbill)
print('_'*100)
print("\nTOTAL AMOUNT : Rs. ",grandTotal)
print('_'*100)
cursor.close()
else:
print("\nERROR ESTABLISHING MYSQL CONNECTION !")
def searchOldBill():
global cid
customer=searchCustomer()
if customer:
if myConnection:
cursor=myConnection.cursor()
sql="SELECT * FROM TOTAL WHERE CID= %s"
cursor.execute(sql,(cid,))
data=cursor.fetchall()
if data:
print(data)
else:
print("Record Not Found Try Again !")
cursor.close()
else:
print("\nSomthing Went Wrong ,Please Try Again !")
def searchCustomer():
global cid
if myConnection:
cursor=myConnection.cursor()
cid=input("ENTER CUSTOMER ID : ")
sql="SELECT * FROM C_DETAILS WHERE CID= %s"
cursor.execute(sql,(cid,))
data=cursor.fetchall()
if data:
print(data)
return True
else:
23
print("Record Not Found Try Again !")
return False
cursor.close()
else:
print("\nSomthing Went Wrong ,Please Try Again !")
print("""
******************PON VIDHAYASHARAM******************
**************HOTEL MANAGEMENT SYSTEM **************
******************JESAN PLAZA HOTEL *******************
""")
myConnection = MYSQLconnectionCheck ()
if myConnection:
MYSQLconnection ()
while True:
print("""
1--->Enter Customer Details
2--->Booking Record
3--->Calculate Room Rent
4--->Calculate Restaurant Bill
5--->Calculate Gaming Bill
6--->Calculate Fashion store Bill
7--->Display Customer Details
8--->GENERATE TOTAL BILL AMOUNT
9--->EXIT """)
choice = int(input("Enter Your Choice"))
if choice == 1:
userEntry()
elif choice ==2:
bookingRecord()
elif choice ==3:
roomRent()
elif choice ==4:
Restaurent()
elif choice ==5:
Gaming()
elif choice ==6:
Fashion()
elif choice ==7:
searchCustomer()
elif choice ==8:
totalAmount()
elif choice ==9:
24
break
else:
print("Sorry ,May Be You Are Giving Me Wrong Input, Please Try
Again !!! ")
else:
print("\nERROR ESTABLISHING MYSQL CONNECTION !")
25
MYSQL OUTPUT
DATABASE
31
TABLE STRUCTURE 3,4,5 AND 6
TABLE STRUCTURE 7
32
BACKEND DATA GENERATED THROUGH SOFTWARE
33
34
15. CONCLUSION
This project can be used in the hotel after adding some more useful modules in
the project for which hotel are providing services. Utmost care and back-up
procedures must be established to ensure 100% successful implementation of
the computerized hotel system. In case of system failure, the organization
should be in a position to process the transaction with another organization or if
the worst comes to the worst, it should be in a position to complete it manually.
The above-mentioned points are the enhancements which can be done to
increase the applicability and usage of this project. Here we can maintain the
records of rooms, restaurants, game station and fashion store. There is a scope
for introducing a method to maintain the Hotel Booking System. Enhancements
can be done to maintain all the hotel, rooms, services, restaurant, gaming,
fashion store, payments, bookings.
We have left all the options open so that if there is any other future requirement
in the system by the user for the enhancement of the system then it is possible to
implement them.
The objective of software planning is to provide a frame work that enables the
manager to make reasonable estimates made within a limited time frame at the
beginning of the software project and should be updated regularly as the project
progresses.
This project is designed to meet the requirements of Hotel Management. It has
been developed in python. For, designing the system we have used simple data
flow diagrams. Overall, the project teaches us the essential skills like:
->Using system analysis and design techniques like data flow diagram in
designing the system.
->Understanding the database handling and query processing.
In the last we would like to thanks all the persons involved in the development
of the system directly or indirectly. We hope that the project will serve its
purpose for which it is develop there by underlining success of the process.
35
16. BIBLIOGRAPHY
References
1. www.studymafia.org
2. Academia.edu
3. FutureGenLabs
4. slideshare.net
5. GeeksforGeeks
6. https://en.wikipedia.org
7. www.stackoverflow.com
8. www.studymafia.com
Books
1. Sumita Arora
2. Rachna Sagar
3. Sultan Chand
36