Download as pdf or txt
Download as pdf or txt
You are on page 1of 41

KURINJI SENIOR SECONDARY SCHOOL, NAMAKKAL

HOTEL MANAGEMENT

PROJECT REPORT

Submitted by

VISHNU A

SRI HARISH VEL M


THARUNKUMAR E

CLASS XII

[2021 – 2022]

I
ACKNOWLEDGEMENT

Apart from the efforts of me, the success of any project depends a largely on the
encouragement and guidelines of many other. I take this opportunity to express my
gratitude to the people who have been instrumental in the successful completions of
this project.

I express my deep sense of gratitude to the luminary The Principal, Kurinji Senior
Secondary School, Namakkal who has been continuously motivating on us.
I shall fail in my duty if I didn't thank COMPUTER SCIENCE TEACHER in
charge, a guide, mentor all the above a friend, who critically reviewed my project
and helped in solving each and every problem, occurred during implementation of
the project.
The guidance and support received from all the members who contributed and who
are contributing in this project was vital for the success of the project. I am
gratefully for their constant support and help.

III
ABSTRACT
This application is specially developed to help hotel staff. The project Hotel
Management manages and maintains the records of customers and room in the
hotel. The rooms have different categories such as Standard Non-Ac, Standard Ac
etc. So their charges and records will be maintained accordingly. This software
has been made in a user-friendly interface, so that anyone can add, delete the
entries of customers and handle all the transactions easily. Asset-up-user etc., also
the user name and password get stored in the data base in encrypted format more
dealing with the security. Customer can either make booking in advance, facility to
generate report of transactions made in terms of check-in & check-out, bookings
by day or specified time span.

IV
TABLE OF CONTENTS

CHAPTER TITLE PAGE


NO. NO.

Bonofide Certificate ii
Acknowledgement iii
Abstract IV
1. INTODUCTION 1
2. SYSTEM ANALYSIS 2
2.1 Objectives
2.2 Proposed System
2.3 Functionalities provided by python project
on Hotel & room management
3. HARDWARE AND SOFTWARE 4
REQUIREMENTS
4. PROJECT DESCRIPTION 4
4.1 Module
4.2 System Testing
5. RESULT DISCUSSION 6
5.1 Source Code
5.2 Screenshot
6. CONCLUSION 22
7. BIBLIOGRAPHY 22
8. FUTURESCOPE 22

V
HOTEL MANAGEMENT

1. INTRODUCTION
 The Hotel Management System Project in Python is a general software developed
(using Python) to simplify hotel operations by automating them. In this tutorial I
will teach you on how to Create Hotel Management System Project in Python.

 A Hotel Management System Project Using Python It covers major aspects of


hotel management: it could perform the following operations. Hotel Booking,
Provide you with Hotel Rooms Info, Room Service, Billing and Record-Keeping.

 This tutorial includes the downloadable hotel management system in python


source code where in you modify it to fit your client requirements.

 You don't have to worry because I will expect that I will guide you to the step- by-
step process especially in declaring it variables and modules.

1
1. SYSTEM ANALYSIS
1.1 OBJECTIVES:
Hotel Management System (HMS) is a Hotel Management System to add to the
misery, they are made to carry a long list of Customer reports, Customer Bills,
Room Details, Service Details, and Restaurant Information. Bar Information,
Restaurant bills and Bar bills and so on.
 The most affected are the less educated majority and the poor who cannot
maintain these documents in a systematic fashion.

 This application gives him the power and flexibility to manage the entire
system from a single online system. Hotel management project provides room
booking, staff management and other necessary hotel management features.

 The system allows the manager to post available rooms in the system.
Customers can view and book room online.

1.2 PROPOSED SYSTEMS


The development of the new system contains the following activities, which try
to automate the entire process keeping in the view of database integration
approach.
 System maintains user's personal info, address, and contact details.
 User friendliness is provided in the application with various controls provided
by system rich user interface.
 This system makes the overall project management much easier and flexible.
 Various classes have been used for maintaining the details of all the users
catalog.
 Authentication is provided for this application. Only registered users can
access.
 This system is providing more memory for the users to maintain data.

 This system is providing accessibility control to data with respect to users.

2
2.3Functionalities provided by python project on Hotel management

1. Simplifies Front Office Tasks:


A hotel booking system can provide the real time status of the hotel rooms. Front
desk staff can draw bookings directly on their front desk console and update them
with complete ease. A booking system like Hotelogix, even has a Dynamic Room
Allocation Manager which automatically allocates rooms to guests by scanning
through various parameters, such as, cleanliness, availability, occupancy, and so
on.

2. Enables distribution:
Hotel booking software enables hotels to be present in the global marketplace in
real time. Competition is extremely stiff in the hospitality industry, and your guests
have numerous hospitality options when they are travelling - B&B's, hostels,
hotels, boutiques, Airbnb and so on. To stay ahead of the competition, you need
to ensure that your hotels are as visible as possible. The hotel booking software
enables hotels to not just maximize bookings via the hotel's own website but also
be present in various online channels - OTA's and GDS. Also with the booking
software, your inventory and rate parity uniformly across all channels via one
platform hotel can manage all the channels via one interface, therefore maintaining
their room rm. This helps simplify operations for your reservations team and also
ensures that issues such as double or overbooking are eliminated.

3. Improves guest reservations:


Many OTA's now promote their site by offering free cancellations or changes in
the booking up to a certain date. If your hotel doesn't have its own booking system
and has to deal with various vendors manually this can create a lot of confusion
in bookings and result in huge losses. An integrated booking system allows
information to be synced via all systems, so any reservation that is cancelled or
changed via the OTA gets updated, in real time.

3
4. Increases multi-tasking:
With the booking system, a hotel with minimal staff can effectively manage
several tasks simultaneously. They can manage group check INS, check out of
other guests, and confirm reservations, and so on, all at the same time.
3. Hardware and software requirements:
1. Operating system: Windows 7 and above
2. Processor: Pentium or amdathalon (3800+4200+dual core)
3. Motherboard: 1.845 or 915.995 for Pentium or msi
k9mm vviaK8m800+8237r
Plus
Chipset for amdathalon
4. Ram: 512+mb
5. Hard disk: sata 40 GB or above
6. Cd/DVD/multi Drive combo: (if backup required).
7. Floppy drive: (if backup required)
8. Monitor, Keyboard, Mouse and Printer
9. Software: Python
4. PROJECT DESCRIPTION
4.1 Modules of Hotel Management system

 Manage Rooms module: It contains all the functionalities related to adding


new room details ,to get room details by room no ,to find available rooms by
number of beds ,to edit room details ,to delete room and to view all room details.

 Manage Customers module: It contains all the required functions which


includes adding new customers, to show customer details by (name, id, address,
phone number, room no, check in date), to show current list of customers, to check
out the room, to edit and delete customer details and to view all the customers.

4
4.2 SYSTEM TESTING

LEVELS OF TESTING:
 In order to uncover the errors present in different phases we have the
concept of levels of testing. The basic levels of testing are as shown below.
System Testing:
 The philosophy behind testing is to find errors. Test cases are devised with
this in mind. A strategy employed for system testing is code testing.
Code testing:
 This strategy examines the logic of the program. To follow this method, we
developed some test data that resulted in executing every instruction in the program
and module i.e. every path is tested. Systems are not designed as entire nor are they
tested as single systems. To ensure that the coding is perfect two types of testing is
performed or for that matter is performed or that matter is performed or for that
matter is performed on all systems.
Unit Testing:
 Unit testing focuses verification effort on the smallest unit of software
i.e. the module. Using the detailed design and the process specifications testing
is done to uncover errors within the boundary of the module.
Link Testing:
 Link testing does not test software but rather the integration of each module
in system. The primary concern is the compatibility of each module.
Integration Testing:
 After the unit testing, we have to perform integration testing. The goal here
is 10 see if modules can be integrated properly, the emphasis being on testing
interfaces between modules. This testing activity can be considered as testing the
design and hence the emphasis on testing module interactions.

5
4.3 Installation process:
 Install python 3.4.0 in your device if you do not have python.
 Run the file “installationwindow.py”, "loginwindow.py" in your pc to create
splash screen, install window screen and first time install functionality.
 Run "Hotelmanagement.py" in the python command to get the output.

4.4 Module used in this program:


 pip install pickle

6
5. RESUTS DISCUSSION
5.1 SOURCE CODE:
#main.py
from rooms import room_menu

from customers import customer_menu

from myprint import print_center, input_center

from datetime import date

Z = date.today()

d1 = Z.strftime("%d/%m/%Y")

if __name__ == '__main__':

while True:

print()

print("\t\t\t+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++")

print("\t\t\t+ +")

print("\t\t\t+ WELCOME TO SRI HARISH VEL 5 STAR HOTEL & ROOM SERVICES +")

print("\t\t\t+ POWERED BY VISHNU SOFTWARE TECHNOLOGIES Pvt Ltd. +")

print("\t\t\t+ +")

print("\t\t\t+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++")

print("\t\t\t\t\t\t\t\t\t\tToday's date", d1,"\n")

print_center("1. Manage Rooms")

print_center("2. Manage Customers")

print_center("0. Exit")

print()

choice = int(input_center("Enter your choice: "))

if choice == 1:

room_menu()

elif choice == 2:

customer_menu()

elif choice == 0:

7
break

else:

print("Invalid choice (Press 0 to exit)")

print_center("GoodBye")

8
#datafile.py
import pickle

class DataFile:

def __init__(self, name):

self.name = name

def add_record(self, record):

file = open(self.name, "ab")

pickle.dump(record, file)

file.close()

def get_records(self):

records = []

try:

file = open(self.name, "rb")

except FileNotFoundError:

return records

while True:

try:

record = pickle.load(file)

records.append(record)

except EOFError:

break

file.close()

return records

def overwrite(self, records):

file = open(self.name, "wb")

for record in records:

pickle.dump(record, file)

file.close()

9
#customer.py
from datetime import datetime

from myprint import print_bar

class Customer:

def __init__(self, customer_id, name, address, phone, room_no, entry_date, checkout_date):

self.customer_id = customer_id

self.name = name

self.address = address

self.phone = phone

self.room_no = room_no

self.entry_date = entry_date

self.checkout_date = checkout_date

def print_all(self):

print(str(self.customer_id).ljust(3),

self.name[0:15].ljust(15),

self.address[0:15].ljust(15),

self.phone.ljust(15),

str(self.room_no).ljust(10),

self.entry_date.strftime("%d-%b-%y").ljust(15),

(self.checkout_date.strftime("%d %b %y") if self.checkout_date is not None else "None").ljust(15))

def print_full(self):

print_bar()

print("Customer #", self.customer_id)

print("Name: ", self.name)

print("Address: ", self.address)

print("Phone: ", self.phone)

print("Checked in to room #", self.room_no, " on ", self.entry_date.strftime("%d %b %y"))

print("Checkout: ", self.checkout_date.strftime("%d %b %y") if self.checkout_date is not None else None)

print_bar()

10
def create_customer(customer_id, room_no):

name = input("Enter the name: ")

address = input("Enter the address: ")

phone = input("Enter the phone: ")

entry_date = datetime.now()

return Customer(customer_id, name, address, phone, room_no, entry_date, None)

def print_header():

print("="*100)

print("id".ljust(3),

"name".ljust(15),

"address".ljust(15),

"phone".ljust(15),

"room no".ljust(10),

"entry".ljust(15),

"check out".ljust(15))

print("="*100)

11
#customers.py
from datetime import datetime

from customer import create_customer, print_header

from rooms import get_and_print_room_by_no, change_room_status

from datafile import DataFile

NUMBER_OF_RECORDS_PER_PAGE = 10

customerTable = DataFile("customers.dat")

def add_customer():

rooms, found, position = get_and_print_room_by_no()

if found:

room_no = rooms[position].room_no

customers = customerTable.get_records()

if len(customers) == 0:

customer_id = 0

else:

customer_id = customers[len(customers)-1].customer_id + 1

customer = create_customer(customer_id, room_no)

confirm = input("Complete the operation? (Y/N) ")

if confirm.lower() == 'y':

customerTable.add_record(customer)

change_room_status(room_no, False)

print("Operation Successful")

else:

print("Operation Canceled")

def get_and_print_customer_list_by_name():

customers = customerTable.get_records()

12
results = []

if len(customers) == 0:

print("No Records found")

else:

name = input("Enter the name: ").lower()

words = name.split()

for customer in customers:

for word in words:

if word in customer.name.lower():

results.append(customer)

if len(results) == 0:

print("No matching record")

else:

print(len(results), " matching records")

print_header()

for customer in results:

customer.print_all()

return results

def get_and_print_employee_by_id():

customers = customerTable.get_records()

found = False

position = -1

if len(customers) == 0:

print("No Records found")

else:

customer_id = int(input("Enter the id: "))

for customer in customers:

position += 1

if customer_id == customer.customer_id:

13
found = True

break

if not found:

print("No matching record")

else:

customers[position].print_full()

return customers, found, position

def get_and_print_customer_list_by_address():

customers = customerTable.get_records()

results = []

if len(customers) == 0:

print("No Records found")

else:

address = input("Enter the address: ").lower()

words = address.split()

for customer in customers:

for word in words:

if word in customer.address.lower():

results.append(customer)

if len(results) == 0:

print("No matching record")

else:

print(len(results), " matching records")

print_header()

for customer in results:

customer.print_all()

return results

def get_and_print_customer_list_by_phone():

customers = customerTable.get_records()

14
results = []

if len(customers) == 0:

print("No Records found")

else:

phone = input("Enter the phone number: ")

for customer in customers:

if phone in customer.phone:

results.append(customer)

if len(results) == 0:

print("No matching record")

else:

print(len(results), " matching records")

print_header()

for customer in results:

customer.print_all()

return results

def get_and_print_customer_by_room_no():

customers = customerTable.get_records()

found = False

position = -1

if len(customers) == 0:

print("No Records found")

else:

room_no = int(input("Enter the room no: "))

for customer in customers:

position += 1

if room_no == customer.room_no and customer.checkout_date is None:

found = True

break

if not found:

15
print("No matching record")

else:

customers[position].print_full()

return customers, found, position

def print_customer_list_by_check_in():

customers = customerTable.get_records()

if len(customers) == 0:

print("No customers found")

else:

print("Enter the date: ")

day = int(input("day of month: "))

month = int(input("month: "))

year = int(input("year: "))

check_in = datetime(year, month, day)

results = []

for customer in customers:

if customer.entry_date.date() == check_in.date():

results.append(customer)

if len(results) == 0:

print("no matching records")

else:

print(len(results), " matching customers")

print_header()

for customer in results:

customer.print_all()

def print_current_list_of_customers():

customers = customerTable.get_records()

if len(customers) == 0:

print("No customers found")

16
else:

results = []

for customer in customers:

if customer.checkout_date is None:

results.append(customer)

if len(results) == 0:

print("no matching records")

else:

print(len(results), " matching customers")

print_header()

for customer in results:

customer.print_all()

def check_out():

customers, found, position = get_and_print_customer_by_room_no()

if found:

customer = customers[position]

customer.checkout_date = datetime.now()

confirm = input("Confirm checkout? (Y/N): ")

if confirm == 'y':

customerTable.overwrite(customers)

change_room_status(customer.room_no, True)

print("Operation Successful")

else:

print("Operation Cancelled")

def edit_customer_details():

customers, found, position = get_and_print_customer_by_room_no()

if found:

customer = customers[position]

print("Input new values (leave blank to keep previous value)")

name = input("Enter new name: ")

17
if len(name) > 0:

customer.name = name

address = input("Enter new address: ")

if len(address) > 0:

customer.address = address

phone = input("Enter new phone: ")

if len(phone) > 0:

customer.phone = phone

confirm = input("Confirm Edit? (Y/N): ")

if confirm == 'y':

customerTable.overwrite(customers)

print("Operation Successful")

else:

print("Operation Cancelled")

def delete_customer():

customers, found, position = get_and_print_customer_by_room_no()

if found:

print("Confirm delete?? (Y/N): ")

confirm = input()

if confirm == 'y':

customers.pop(position)

customerTable.overwrite(customers)

print("Operation Successful")

else:

print("Operation Cancelled")

def view_all_customers():

customers = customerTable.get_records()

if len(customers) == 0:

print("No Record found")

else:

18
i=0

print_header()

for customer in customers:

i += 1

customer.print_all()

if i == NUMBER_OF_RECORDS_PER_PAGE:

input("Press any key to continue.")

def customer_menu():

while True:

print()

print("==============================")

print("==========Customer Menu=========")

print("==============================")

print()

print("1. New Customer")

print("2. Show Customer Details by name")

print("3. Show customer details by id")

print("4. Show customer details by address")

print("5. Show customer details by phone number")

print("6. Show customer details by room no")

print("7. Show customer details by check in date")

print("8. Show current list of customers")

print("9. Check out")

print("10. Edit customer Details")

print("11. Delete Customer record")

print("12. View all customers")

print("0. Go Back")

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

if choice == 1:

add_customer()

elif choice == 2:

19
get_and_print_customer_list_by_name()

elif choice == 3:

get_and_print_employee_by_id()

elif choice == 4:

get_and_print_customer_list_by_address()

elif choice == 5:

get_and_print_customer_list_by_phone()

elif choice == 6:

get_and_print_customer_by_room_no()

elif choice == 7:

print_customer_list_by_check_in()

elif choice == 8:

print_current_list_of_customers()

elif choice == 9:

check_out()

elif choice == 10:

edit_customer_details()

elif choice == 11:

delete_customer()

elif choice == 12:

view_all_customers()

elif choice == 0:

break

else:

print("Invalid choice (Press 0 to go back)")

20
#room.py
from myprint import print_bar

class Room:

def __init__(self, room_id, room_no, floor, beds, available):

self.room_id = room_id

self.room_no = room_no

self.floor = floor

self.beds = beds

self.available = available

def print_all(self):

print(str(self.room_id).ljust(3),

str(self.room_no).ljust(15),

self.floor.ljust(15),

str(self.beds).ljust(15),

str(self.available).ljust(15))

def print_full(self):

print_bar()

print("Record #", self.room_id)

print("Room No: ", self.room_no)

print("Floor: ", self.floor)

print("Beds: ", self.beds)

print("available: ", self.available)

print_bar()

def create_room(room_id):

room_no = int(input("Enter the room no: "))

floor = input("Enter the floor (Ex. ground, first etc.): ")

beds = int(input("Enter number of beds: "))

21
available = True

return Room(room_id, room_no, floor, beds, available)

def print_header():

print("="*100)

print("id".ljust(3),

"room no".ljust(15),

"floor".ljust(15),

"beds".ljust(15),

"available".ljust(15)

print("="*100)

22
#rooms.py
from datafile import DataFile

from room import create_room, print_header

NUMBER_OF_RECORDS_PER_PAGE = 10

roomTable = DataFile("rooms.dat")

def add_room():

rooms = roomTable.get_records()

if len(rooms) == 0:

room_id = 0

else:

room_id = rooms[len(rooms) - 1].room_id + 1

room = create_room(room_id)

roomTable.add_record(room)

print("Operation Successful")

def get_and_print_room_by_no():

rooms = roomTable.get_records()

found = False

position = -1

if len(rooms) == 0:

print("No Record found")

else:

room_no = int(input("Enter the room no: "))

for room in rooms:

position += 1

if room_no == room.room_no:

found = True

break

if not found:

print("No matching record")

else:

rooms[position].print_full()

23
return rooms, found, position

def get_and_print_room_by_beds():

rooms = roomTable.get_records()

results = []

if len(rooms) == 0:

print("No Records found")

else:

beds = int(input("Enter the number of required beds: "))

for room in rooms:

if beds == room.beds:

results.append(room)

if len(results) == 0:

print("No matching record")

else:

print(len(results), " matching records")

print_header()

for room in results:

room.print_all()

return results

def edit_room_details():

rooms, found, position = get_and_print_room_by_no()

if found:

room = rooms[position]

print("Input new values (leave blank to keep previous value)")

room_no = input("Enter new room no: ")

if len(room_no) > 0:

room.room_no = int(room_no)

floor = input("Enter new floor: ")

if len(floor) > 0:

room.floor = floor

beds = input("Enter number of beds: ")

if len(beds) > 0:

22
room.beds = int(beds)

roomTable.overwrite(rooms)

print("Operation Successful")

def delete_room():

rooms, found, position = get_and_print_room_by_no()

if found:

room = rooms[position]

print("Delete this room ? (Y/N) : ")

confirm = input()

if confirm.lower() == 'y':

rooms.remove(room)

roomTable.overwrite(rooms)

print("Operation Successful")

else:

print("Operation Canceled")

def change_room_status(room_no, available):

rooms = roomTable.get_records()

found = False

position = -1

if len(rooms) == 0:

print("No Record found")

else:

for room in rooms:

position += 1

if room_no == room.room_no:

found = True

break

if not found:

print("No matching record")

else:

room = rooms[position]

room.available = available

23
roomTable.overwrite(rooms)

print("Operation Successful")

def view_all_rooms():

rooms = roomTable.get_records()

if len(rooms) == 0:

print("No Record found")

else:

i=0

print_header()

for room in rooms:

i += 1

room.print_all()

def room_menu():

while True:

print()

print("============================")

print("==========Room Menu=========")

print("============================")

print()

print("1. Add new room")

print("2. Get room details by room no")

print("3. Find available rooms by number of beds")

print("4. Edit Room details")

print("5. Delete room")

print("6. View all rooms")

print("0. Go Back")

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

if choice == 1:

add_room()

elif choice == 2:

get_and_print_room_by_no()

24
elif choice == 3:

get_and_print_room_by_beds()

elif choice == 4:

edit_room_details()

elif choice == 5:

delete_room()

elif choice == 6:

view_all_rooms()

elif choice == 0:

break

else:

print("Invalid choice (Press 0 to go back)")

25
#myprint.py
SCREEN_WIDTH = 100

def print_center(s):

x_pos = SCREEN_WIDTH // 2

print((" " * x_pos), s)

def print_bar():

print("=" * 100)

def print_bar_ln():

print_bar()

print()

def input_center(s):

x_pos = SCREEN_WIDTH // 2

print((" " * x_pos), s, end='')

return input()

26
5.2 Output:

27
28
29
30
31
32
33
34
6. CONCLUSION:
Hotel management system now-a-day have the advantage of modernization.
Computer have done the work more easy. Computer is playing an important role
in management. Reports are made on daily basis for every customer check in or
check out which can easily be seen by the management. Hotel management
system has also primary purpose is to provide facilities to customers. A software
for computers makes the things many times easy, these are made as user friendly
and to keep a check and balance in hotel management and accounts as well. So
these things are important.

7. BIBLIOGRAPHY:

 Computer science with PYTHON Sumitha Arora text book.

 Website: https://itsourcecode.com/freeprojects/python-
projects/hotel management-systemproject-in-python/
 With guidelines of computer science staffs.

8. FUTURE SCOPE:

At present this software does not contains credit card facility. We can us
this application in online so that we can reserve the table and do the online
payment. So as the demand increases, we can add these modules as the future
scope.

35

You might also like