Hotel

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 36

Computer science

PROJECT REPORT
GRADE – XII

PROJECT PREPARED BY:

NAME OF THE STUDENT:

ROLL NUMBER : …………………………………………………

PROJECT TOPIC : …………………………………..............

HOSUR PUBLIC SCHOOL


2022 – 2023
1
CERTIFICATE

This is to certify that the project work entitled

“……………………………………………………………………………

…………….”

is a bonafide record of work done by…………………………………… ,

Roll no:……………….…in partial fulfilment for the award of 12th

standard during the academic year 2022 - 2023.

Date:
Registration No.:

Signature of Internal Signature of External


Examiner Examiner

Signature of Principal
2
ACKNOWLEDGEMENT
I would like to take this opportunity to express my deep sense of
gratitude to all those people without whom this project could have
never been completed. First and foremost I like to thank God for
giving me such a great opportunity to work on this project, and I
would like to express my special thanks and gratitude to the
Management, the Directors and the Correspondent of Hosur Public
School, for their constant guidance and providing a very nice platform
to learn.

I would also like to thank our Principal – Dr. V. Bindhu Hosur


Public School, for her constant encouragement and moral support
without which I would have never be able to give my best.

I would also like to thank Mr. A.M. Balakrishna, Computer


Science Teacher, Hosur Public School, who gave me the wonderful
opportunity to do this project, which also helped me in doing a lot of
research and I came to know about so many new things from this
study I am really thankful to all.

3
Hotel
Management
System

INDEX
4
Sl.no Topic Page number
1 Abstract 6
2 System requirements 7
3 Feasibility study 8
4 Errors and its types 9
5 Testing 10
6 Maintenance 11
7 Function used 12-13
8 Source Code 14-30
9 Output 31-35
10 Conclusion 36
11 Bibliography 66

ABSTRACT

5
The Hotel Management System (HMS) is designed for Any
Hotel to replace their existing manual, paper based system.
This System targets to provide complete solution for Hotel
services. This System can be used in any hotels for
maintaining their customer details and their booking records.
It integrates the entire Resources of a Hotel into One
Integrated Software Application.

OBJECTIVES OF THIS 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 in computer
science.

SYSTEM REQUIREMENTS:
6
1. HARDWARE:
✓Processor

✓Keyboard

✓Minimum memory -2GB

2. SOFTWARE:
✓Operating System –OS7, OS8

✓Python IDLE

FEASIBILITY STUDY

7
Feasibility study is a system proposal according to its work,
ability, impact on the operation ability to meet the needs of
users and efficient use of resources. An important outcome of
preliminary investigations the determination of that system
requested feasible.

ECONOMICAL FEASIBILITY:
Economic analysis is the most frequently used method for
measuring the records of the customers, their bookings and
offers that they expect etc., and compare them with the cost.
This software is not very costly. So customer’s records can be
maintained at a cheaper cost and every hotel would like to use
this software so that the customer’s records can be managed
easily.

TECHNICAL FEASIBILTY:
Technical feasibility center on the existing computer system
and to what extent it can support the proposed task. This
involves financial consideration to accommodate technical
enhancements. It is technically feasible because whatever
technology is needed to develop this software is easily
available.

ERRORS AND ITS TYPES


8
An error, sometime called “A BUG” is anything in the code that
prevents a program from compiling and running correctly.
There are broadly three types of errors as follows:

1. Compile-time errors:

An error that occurs during compilation of a program


is called compile time error. It has two types as follows:
A. Syntax error: It refers to formal rules governing the
construction of valid statements in a language.
B .Semantics error: It refers to the set of rules which give the
meaning of a statement.

2. Run time Errors:

Errors that occur during the execution of program are run time
errors. These are harder to detect errors. Some run-time error
stop the execution of program which is then called program
“Crashed”.

3. Logical Errors:

Sometimes, even if you don’t encounter any error during


compiling-time and runtime, your program does not provide
the correct result. This is because of the programmer’s
mistaken analysis of the problem he or she is trying to solve.
Such errors are called logical error.

TESTING
9
1. Alpha Testing:
It is the most common type of testing used in the software
industry. The objective of this testing is to identify all possible
issues or defects before releasing it into the market or to the
user. It is conducted at the developer’s site.

2. Beta Testing:
It is a formal type of software testing which is carried out by
the customers. It is performed in a real environment before
releasing the products into the market for the actual end-
users. It is carried out to ensure that there are no major
failures in the software or product and it satisfies the business
requirement. Beta Testing is successful when the customer
accepts the software.

3. White Box Testing:


White box testing is based on the knowledge about the
internal logic of an application’s code. It is also known as Glass
box Testing. Internal Software and code working should be
known for performing this type of testing. These tests
arebased on the coverage of the code statements, branches,
paths, conditions etc.

4. Black Box Testing:


It is a software testing, method in which the internal structure
or design of the item to be tested is not known to the tester.
This method of testing can be applied virtually to every level of
the software testing.
MAINTENANCE

10
Programming maintenance refers to the modifications in the
program. After it has been completed, in order to meet the
changing requirement or to take care of the errors that shown
up. There are four types of maintenance:

1. Corrective Maintenance:
When the program after compilation shows error
because of some unexpected situations, untested areas such
errors are fixed up by Corrective maintenance.

2. Adaptive Maintenance:
Changes in the environment in which an
information system operates may lead to system
management. To accommodate changing needs time to time
maintenance is done and is called Adaptive maintenance.

3. Preventive Maintenance:
If possible the errors could be anticipated before
they actually occur; the maintenance is called Preventive
maintenance.

4. Perfective Maintenance:
In this rapidly changing world, information technology is the
fastest growing area. If the existing system is maintained to
keep tuned with the new features, new facilities, new
capabilities, it is said to be Perfective maintenance.

11
FUNCTIONS USED

1) POP():
Pop () is an inbuilt function in Python thatremoves
and returns last value from the list of the given index value.

2) RANDOM MODULE:
Python offers random module that cangenerate
random numbers. These are pseudo-random number as the
sequence of number generated depends on the seed

3) DATE TIME MODULE :


The date time module supplies classes for
manipulating dates and times.

4) APPEND():
The append () method in python adds a single item
to the existing list. It doesn't return a new list of items but
will modify the original list by adding the item to the end
of the list. After executing the method append on the list
the size of the list increases by one.

5) SPLIT():
The split () method splits a string into a list.

6) RANDRANGE():
The randrange () method returns a randomly selected
element from the specified range.

12
7) Checkin_Date_Checker() &
Checkout_Date_Checker:

Function to validate date entered by the


user/customer.

8) ROOM_BOOKING ():
Function for booking room in hotel by entering
user/customer details.

9) ROOM_INFO():
Function to provide users/customers with hotel rooms
information (i.e. about room amenities).

10) ROOM_SERVICE():
Function for room service which provides
user/customer with the restaurant’s menu card to order
food at the room.

11) BILL_PAYMENT():
Function for payment of hotel room and restaurant
bill generation at the time of check-out.

12) RECORD_CHECK():
Function for keeping records of customers stayed in
the hotel.

13
SOURCE CODE
defCheckin_Date_Checker(c):
globali
if c[2] >= 2000 and c[2] <= 2020:
if c[1] != 0 and c[1] <= 12:
if c[1] == 2 and c[0] != 0 and c[0] <= 31:
if c[2]%4 == 0 and c[0] <= 29:
pass
elif c[0]<29:
pass
else:
print("Invalid date!!!!! Please try from first\n")
name.pop(i)
phno.pop(i)
add.pop(i)
checkin.pop(i)
Room_Booking()
elif c[1] <= 7 and c[1]%2 != 0 and c[0] <= 31:
pass
elif c[1] <= 7 and c[1]%2 == 0 and c[0] <= 30 and c[1] !=
2:
pass
elif c[1] >= 8 and c[1]%2 == 0 and c[0] <= 31:
pass
elif c[1]>=8 and c[1]%2!=0 and c[0]<=30:
pass
else:
print("Invalid date!!!!! Please try from first\n")
name.pop(i)

14
add.pop(i)
checkin.pop(i)
Room_Booking()
else:
print("Invalid date!!!!! Please try from first\n")
name.pop(i)
add.pop(i)
checkin.pop(i)
Room_Booking()
else:
print("Invalid date!!!!! Please try from first\n")
name.pop(i)
add.pop(i)
checkin.pop(i)
Room_Booking()
defCheckout_Date_Checker(c):
globali
if c[2] >= 2000 and c[2] <= 2020:
if c[1] != 0 and c[1] <= 12:
if c[1] == 2 and c[0] != 0 and c[0] <= 31:
if c[2]%4 == 0 and c[0] <= 29:
pass
elif c[0]<29:
pass
else:
print("Invalid date!!!!! Please try from first\n")
name.pop(i)
add.pop(i)
checkin.pop(i)
checkout.pop(i)
Room_Booking()
elif c[1] <= 7 and c[1]%2 != 0 and c[0] <= 31:
pass
15
elif c[1] <= 7 and c[1]%2 == 0 and c[0] <= 30 and c[1] !=
2:
pass
elif c[1] >= 8 and c[1]%2 == 0 and c[0] <= 31:
pass
elif c[1]>=8 and c[1]%2!=0 and c[0]<=30:
pass
else:
print("Invalid date\n")
name.pop(i)
add.pop(i)
checkin.pop(i)
checkout.pop(i)
Room_Booking()
else:
print("Invalid date!!!!! Please try from first\n")
name.pop(i)
add.pop(i)
checkin.pop(i)
checkout.pop(i)
Room_Booking()
else:
print("Invalid date!!!!! Please try from first\n")
name.pop(i)
add.pop(i)
checkin.pop(i)
checkout.pop(i)
Room_Booking()
defRoom_Booking():
globali
global name
global add
global p
16
globalphno
global price
global day
globalcheckin
global checkout
global room
print(" BOOKING ROOMS")
print(" ")
while 1:
n = str(input("Name: "))
p1 = str(input("Phone No.: "))
a = str(input("Address: "))

if n!="" and p1!="" and a!="":


name.append(n)
add.append(a)
break
else:

else:
print("\tPhone no. already exists..!!")
name.pop(i)
add.pop(i)
Booking()
cii=str(input("Check-In: "))
checkin.append(cii)
cii=cii.split('/')
ci=cii
ci[0]=int(ci[0])
ci[1]=int(ci[1])
ci[2]=int(ci[2])
Checkin_Date_Checker(ci)
coo=str(input("Check-Out: "))
17
checkout.append(coo)
coo=coo.split('/')
co=coo
co[0]=int(co[0])
co[1]=int(co[1])
co[2]=int(co[2])
if co[1]<ci[1] and co[2]<ci[2]:
print("\n\tErr..!!\n\tCheck-Out date must fall after Check-
In!!!!! Please try from first\n")
name.pop(i)
add.pop(i)
checkin.pop(i)
checkout.pop(i)
Room_Booking()
elif co[1]==ci[1] and co[2]>=ci[2] and co[0]<=ci[0]:
print("\n\tErr..!!\n\tCheck-Out date must fall after Check-
In!!!!! Please try from first\n")
name.pop(i)
add.pop(i)
checkin.pop(i)
checkout.pop(i)
Room_Booking()
else:
pass
Checkout_Date_Checker(co)
d1 = datetime.datetime(ci[2],ci[1],ci[0])
d2 = datetime.datetime(co[2],co[1],co[0])
d = (d2-d1).days
day.append(d)
print("----SELECT ROOM TYPE----")
print(" 1. Standard Non-AC")
print(" 2. Standard AC")
print(" 3. 3-Bed Non-AC")
18
print(" 4. 3-Bed AC")
print("\t\tPress 0 for Room Prices")
ch=int(input("->"))
ifch==0:
print(" 1. Standard Non-AC - Rs. 3500")
print(" 2. Standard AC - Rs. 4000")
print(" 3. 3-Bed Non-AC - Rs. 4500")
print(" 4. 3-Bed AC - Rs. 5000")
ch=int(input("->"))
ifch==1:
room.append('Standard Non-AC')
print("Room Type- Standard Non-AC")
price.append(3500)
print("Price- 3500")
elifch==2:
room.append('Standard AC')
print("Room Type- Standard AC")
price.append(4000)
print("Price- 4000")
elifch==3:
room.append('3-Bed Non-AC')
print("Room Type- 3-Bed Non-AC")
price.append(4500)
print("Price- 4500")
elifch==4:
room.append('3-Bed AC')
print("Room Type- 3-Bed AC")
price.append(5000)
print("Price- 5000")
else:
print(" Wrong choice..!!")
rn = random.randrange(100)+300
cid = random.randrange(90)+10
19
whilern in roomno or cid in custid:
rn = random.randrange(100)+300
cid = random.randrange(90)+10
rc.append(0)
p.append(0)
print("")
print("\t\t\t***ROOM BOOKED SUCCESSFULLY***\n")
print("Room No. - ",rn)
print("Customer Id - ",cid)
roomno.append(rn)
custid.append(cid)
i=i+1
n=int(input("0-BACK\n ->"))
if n==0:
return
else:
exit()

defRooms_Info():
print(""" ------ HOTEL ROOMS INFO ------
\t\tSTANDARD NON-AC
\t\t---------------------------------------------------------------
\t\tRoom amenities include: 1 Double Bed, Television,
Telephone,
\t\tDouble-Door Cupboard, 1 Coffee table with 2 sofa,
Balcony and
\t\tan attached washroom with hot/cold water.\n
\t\tSTANDARD NON-AC
\t\t---------------------------------------------------------------
\t\tRoom amenities include: 1 Double Bed, Television,
Telephone,

20
\t\tDouble-Door Cupboard, 1 Coffee table with 2 sofa,
Balcony and
\t\tan attached washroom with hot/cold water +
Window/Split AC.\n
\t\t3-Bed NON-AC
\t\t---------------------------------------------------------------
\t\tRoom amenities include: 1 Double Bed + 1 Single Bed,
Television,
\t\tTelephone, a Triple-Door Cupboard, 1 Coffee table with
2 sofa, 1
\t\tSide table, Balcony with an Accent table with 2 Chair
and an
\t\tattached washroom with hot/cold water.\n
\t\t3-Bed AC
\t\t---------------------------------------------------------------
\t\tRoom amenities include: 1 Double Bed + 1 Single Bed,
Television,
\t\tTelephone, a Triple-Door Cupboard, 1 Coffee table with
2 sofa,
\t\t1 Side table, Balcony with an Accent table with 2 Chair
and an
\t\tattached washroom with hot/cold water + Window/Split
AC.""")
choice=int(input("0->Back"))
if choice==0:
return
else:
exit()
defRoom_Service():
ph=int(input("Customer Id: "))
globali
global name
global add
21
global p
global p1
globalphno
global price
global day
f=0
r=0

for n in range(0,i):
ifcustid[n]==ph and p[n]==0:
f=1
print("---------------------------------------------------------------
----------")
print(" CLASSIC HOTEL")
print("---------------------------------------------------------------
----------")
print(" Menu Card")
print("---------------------------------------------------------------
----------")
print("\n BEVARAGES 26 Dal Fry................
140.00")
print("---------------------------------- 27 Dal
Makhani............ 150.00")
print(" 1 Regular Tea............. 20.00 28 Dal
Tadka.............. 150.00")
print(" 2 Masala Tea.............. 25.00")
print(" 3 Coffee.................. 25.00 PAROTTA")
print(" 4 Cold Drink.............. 25.00
----------------------------------")
print(" 5 Bread Butter............ 30.00 29 Plain
Parotta........... 20.00")
print(" 6 Bread Jam............... 30.00 30 Bun
Parrota............. 25.00")
22
print(" 7 Veg. Sandwich........... 50.00 31 Ghee
Parotta............ 30.00")
print(" 8 Veg. Toast Sandwich..... 50.00 32
KothuParotta........... 50.00")
print(" 9 Cheese Toast Sandwich... 70.00")
print(" 10 Grilled Sandwich........ 70.00 RICE")
print("
----------------------------------")
print(" SOUPS 33 Plain Rice..............
90.00")
print("---------------------------------- 34 Jeera
Rice.............. 90.00")
print(" 11 Tomato Soup............ 110.00 35 Veg
Pulao.............. 110.00")
print(" 12 Hot & Sour............. 110.00 36 Peas
Pulao............. 110.00")
print(" 13 Veg. Noodle Soup....... 110.00")
print(" 14 Sweet Corn............. 110.00 SOUTH INDIAN")
print(" 15 Veg. Munchow........... 110.00
----------------------------------")
print(" 37 Plain Dosa..............
30.00")
print(" MAIN COURSE 38 Onion
Dosa.............. 30.00")
print("---------------------------------- 39 Masala
Dosa............. 50.00")
print(" 16 ShahiPaneer........... 110.00 40 Family Cone
Dosa............ 130.00")
print(" 17 KadaiPaneer........... 110.00 41 Rice +
Idli.............. 130.00")
print(" 18 HandiPaneer........... 120.00 42
SambharVada........... 140.00")
print(" 19 PalakPaneer........... 120.00")
23
print(" 20 Chilli Paneer.......... 140.00 ICE CREAM")
print(" 21 Matar Mushroom......... 140.00
----------------------------------")
print(" 22 Mix Veg................ 140.00 43
Vanilla................. 60.00")
print(" 23 JeeraAloo............. 140.00 44
Strawberry.............. 60.00")
print(" 24 MalaiKofta............ 140.00 45
Pineapple............... 60.00")
print(" 25 AlooMatar............. 140.00 46 Butter
Scotch........... 60.00")
print("Press 0 -to end ")
print()
print("Your order please sir:")
ch=1
items=[]
while(ch!=0):
ch=int(input(" -> "))
ifch>=1 and ch<=46:
rs=dish[ch][1]
r+=rs
items.append(dish[ch])
elifch==0:
pass
else:
print("Wrong Choice..!!")
print("Total Bill: ",r)
ifph not in ate:
ate[ph]=items
else:
a=ate[ph]
items.extend(a)
ate[ph]=items
24
r=r+rc.pop(n)
rc.append(r)
else:
pass
if f == 0:
print("Invalid Customer Id")
n=int(input("0-BACK\n ->"))
if n==0:
return
else:
exit()

defBill_Payment():
ph=str(input("Phone Number: "))
globali
global name
global add
global p
global p1
globalphno
global price
global day
f=0
for n in range(0,i):
ifph==phno[n]:
if p[n]==0:
f=1
print(" Bill Payment")
print(" --------------------------------")
print(" MODE OF PAYMENT")
print(" 1- Credit/Debit Card")
print(" 2- Paytm/PhonePe")
print(" 3- Using UPI")
25
print(" 4- Cash")
x=int(input("-> "))
print("\n Amount: ",(price[n]*day[n])+rc[n])
print("\n Pay For CLASSIC HOTEL")
print(" (y/n)")
ch=str(input("->"))
ifch=='y' or ch=='Y':
print("\n\n --------------------------------")
print(" CLASSIC HOTEL")
print(" --------------------------------")
print(" Bill")
print(" --------------------------------")
print(" Name: ",name[n],"\t\n Phone No.: ",phno[n],"\t\n
Address: ",add[n],"\t")
print("\n Check-In: ",checkin[n],"\t\n Check-Out:
",checkout[n],"\t")
print("\n Room Type: ",room[n],"\t\n Room Charges:
",price[n]*day[n],"\t")
print(" Restaurant Charges: \n")
a=list(ate[custid[n]])
for l in a:
print(l[0],”\t”,l[1])
print("Total:\t\t",rc[n])
print(" --------------------------------")
print("\n Total Amount: ",(price[n]*day[n])+rc[n],"\t")
print(" --------------------------------")

print(" Thank You")


print(" Visit Again :)")
print(" --------------------------------\n")
p.pop(n)
p.insert(n,1)
roomno.pop(n)
26
custid.pop(n)
roomno.insert(n,0)
custid.insert(n,0)
else:
for j in range(n+1,i):
ifph==phno[j] :
if p[j]==0:
pass
else:
f=1
print("\n\tPayment has been Made :)\n\n")
if f==0:
print("Invalid Customer Id")
n = int(input("0-BACK\n ->"))
if n == 0:
return
else:
exit()
defRecord_Check():
globali
global name
global add
global p
global p1
globalphno
global price
global day
globalcheckin
global checkout
global room
ifphno!=[]:
print(" *** HOTEL RECORD ***\n")

27
print("| Name | Phone No. | Address | Check-In |
Check-Out | Room Type | Price |")

print("---------------------------------------------------------------
-------------------------------------------------------")
for n in range(0,i):
print("|",name[n],"\t |",phno[n],"\t|",add[n],"\
t|",checkin[n],"\t|",checkout[n],"\t|",room[n],"\t|",price[n])

print("---------------------------------------------------------------
-------------------------------------------------------")
else:
print("No Records Found")
n = int(input("0-BACK\n ->"))
if n == 0:
return
else:
exit()
import random
importdatetime
name = []
phno = []
add = []
checkin = []
checkout = []
room = []
price = []
rc = []
p = []
roomno = []
custid = []
day = []
dish={1:("Regular Tea",20.00),2:("Masala Tea",25.00),3:
("Coffee",25.00),4:("Cold Drink",25.00),5:("Bread
28
Butter",30.00),6:("Bread Jam",30.00),7:("Veg.
Sandwich",50.00),8:("Veg. Toast Sandwich",50.00),9:
("Cheese Toast Sandwich",70.00),10:("Grilled
Sandwich",70.00),11:("Tomato Soup",110.00),12:("Hot &
Sour",110.00),13:("Veg. Noodle Soup",110.00),14:("Sweet
Corn",110.00),15:("Veg. Munchow.",110.00),16:("Shahi
Paneer",110.00),17:("Kadai Paneer",110.00),18:("Handi
Paneer",120.00),19:("Palak Paneer",120.00),20:("Chilli
Paneer",140.00),21:("Matar Mushroom",140.00),22:("Mix
Veg",140.00),23:("Jeera Aloo",140.00),24:("Malai
Kofta",140.00),25:("Aloo Matar",140.00),26:("Dal
Fry",140.00),27:("Dal Makhani",150.00),28:("Dal
Tadka",150.00),29:("Plain Parotta",20.00),30:("Bun
Parrota",25.00),31:("Ghee Parotta",30.00),32:("Kothu
Parotta",50.00),33:("Plain Rice",90.00),34:("Jeera
Rice",90.00),35:("Veg Pulao",110.00),36:("Peas
Pulao",110.00),37:("Plain Dosa",30.00),38:("Onion
Dosa",30.00),39:("Masala Dosa",50.00),40:("Family Cone
Dosa",130.00),41:("Rice + Idli",130.00),42:("Sambhar
Vada",140.00),43:("Vanilla",60.00),44:
("Strawberry",60.00),45:("Pineapple",60.00),46:("Butter
Scotch",60.00)}
ate={}
i =0
while True:
print("-"*40,"*"*50,"-"*40)
print("\t\t\t\t\t\t\tWELCOME TO CLASSIC HOTEL\n")
print("-"*40,"*"*50,"-"*40)
print("\t\t\t 1 Rooms Specification\n")
print("\t\t\t 2 Book My Room\n")
print("\t\t\t 3 Room Service(Menu Card)\n")
print("\t\t\t 4 Pay My Bill\n")
print("\t\t\t 5 Check My Record\n")
29
print("\t\t\t 0 Exit\n")
ch=int(input("Enter your choice:->"))
ifch == 1:
print(" ")
Rooms_Info()
elifch == 2:
print(" ")
Room_Booking()
elifch == 3:
print(" ")
Room_Service()
elifch == 4:
print(" ")
Bill_Payment()
elifch == 5:
print(" ")
Record_Check()
else:
exit()

30
OUTPUT

31
32
33
34
35
CONCLUSION:

Python is a popular coding language for several reasons – it’s


relatively easy to learn and read, has a massive library to help
you solve many of your coding problems, and a very active
and welcoming community of users. Even if you have no idea
what kind of language Python is, chances are you’re quite
familiar with many programs that are written in Python. Some
of the programs are; YouTube, Google, Instagram, Reddit,
Spotify, Quora etc..

BIBLIOGRAPHY:

 www.greeksforgreeks.org
 www.projectworlds.in
 www.pythonworld.in
 www.wikipedia.com

36

You might also like