0% found this document useful (0 votes)
31 views

Vicky

Uploaded by

t9108990
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views

Vicky

Uploaded by

t9108990
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 62

HOTEL MANAGEMENT SYSTEM

A Project Work submitted in partial fulfillment of the requirements for the degree of

Bachelor of Science in Computer Science

To the

Periyar University, Salem - 11


By

VIGNESH.T

(Reg.No.C21UG197CSC039)

JAYAM ARTS AND SCIENCE COLLEGE

(AFFILAIATED TO PERIYAR UNIVERSITY)

NALLANUR, DHARMAPURI-636809

MARCH - 2024
Mr. P.MUNIYAPPAN., M.Sc.,MPhil.,

Assistant Professor,

Department of Computer science,

Jayam Arts And Science College ,

Nallanur 636 813.

CERTIFICATE

This is to certify that the project entitled “FILE SHARING MANAGEMENT SYSTEM”
submitted to the Periyar University, Salem-11 in partial fulfillment of the requirements for the
award of the Degree of Master of Computer science is a record of original research work done by
M.MOHANKUMAR (Reg.No.C22PG197CSC006) during 2023-2024 of his study in the PG
Department of Computer science, Jayam Arts And Science College, Nallanur, Dharmapuri, under
my supervision and guidance and the project has not formed the basis for the award of any
Degree/Diploma/Associate ship/Fellowship or similar title to any candidate of any University.

Signature of the Guide Head of the Department

Viva-voce examination held on………………………….

Internal Examiner External Examiner


DECLARATION

I hereby declare that the dissertation entitled “FILE SHARING MANAGEMENT SYSTEM”
submitted to the Periyar University, Salem-11 in partial fulfillment of the requirements for the
award of the degree of Master of Computer science is a record of original research work done
by me under the supervision and guidance of Mr.P.MUNIYAPPAN., M.Sc.,MPhil., Assistant
Professor of Computer science, Jayam Arts and Science College, Nallanur, Dharmapuri and it
has not formed the basis for the award of any Degree/ Diploma/ Associate ship/ Fellowship or
similar title to any candidate of any University.

Place: Signature of the Candidate

Date: (M.MOHANKUMAR)
ACKNOWLEDGEMENT

I thank the almighty for showering his choicest blessings in each step of my career.

I wish to express my sincere thanks to the Management of JAYAM ARTS AND SCIENCE COLLEGE

For providing me the needed facilities to do my project work.

I profound my gratitude of the Charismatic Principal Dr.S.PARANJOTHI M.Sc.,M.Phil.,Ph.D., for his


constant support and enthusiastic guidance for pursuing this project word.

I also render my indebtedness Mr.S.SATHIYAMOORTHI., MCA.,MBA.,M.Phil.,B.Ed., (Ph.D) Head of


the Department of Computer Science, for his valuable guidance in successful completion of my project.

I express my sincere thanks to my Guide Mr.P.MUNIYAPPAN., M.Sc.,MPhil., Assistant Professor for


the encouragement throughout my project work.

My sincere thanks to my college friends to helping me completion of my project work.

My boundless sense of graduation thanks to my parents, to my friends, well- wishers


and to each and every person who are directly or indirectly helped me with hand and
hand in completing this project.

(M.MOHANKUMAR)
ABSTRACT

The purpose of the project entitled as "HOTEL MANAGEMENT SYSTEM" is to take hotel
management online in a very simple way in the form of software which is user friendly, simple,
fast, and cost- effective. It deals with the collection of room's information, customer's details, etc.
Traditionally, it was done manually. The main function of the system is to register customers for
rooms and store room's details i.e. room is vacant or occupied etc. and to retrieve these details as
and when required, and also to manipulate these details meaningfully. System input contains
rooom's details, customer's details, while system output is to get these details on to the screen. It
is accessible either by an administrator or receptionist. Only they can add data into the database.
The data can be retrieved easily. The data is managed properly and in a very efficient way.
CHAPTER CONTENTS PAGE.NO
INTRODUCTION

1 1.1 1.1 Introduction


1.2 Problem introduction
1.3 Modules in the project
REQUIREMENT SPECIFICATION

2 2.1 Introduction
2.2 Hardware requirements
2.3 Software specification
ANAYSIS

3.1 Existing System


3 3.2 Proposed System
3.3 Feasibility study
3.4 Software specification
SYSTEM IMPLEMENTATION

4 4.1 Introduction
4.2 Sample code
DESIGN

5 5.1 System Design


5.2 Introduction to UML
5.3 UML Diagram of our project
TESTING

6 6.1 Introduction
6.2 Testing method

7 SAMPLE SCREENSHOTS

8 CONCLUSION

9 BIBLIOGRAPHY
1.1 INTRODUCTION:

The project Hotel Management system includes registration of customers, storing


their details into thesystem. The software has the facility to give a unique id for every
customer and stores the details of every customer. It is accessible either by an
administrator or receptionist. Only they can add data into the database. The data can
be retrieved easily. The interface is very user-friendly. The data is well managed and
makes the data processing very fast The Hotel Management System is powerful,
flexible, and easy to use and is designed and developed to deliver real conceivable
benefits to hotel. Hotel Management System is designed for hotels, to cover a wide
range of hotel administration and management processes. It is an integrated end-to-
end Hotel Management System that provides relevant information about the rooms
and customers. Hotel Management System is a software product suite designed to
improve the quality and management of hotel management in the areas of client and
room management process. Hotel Management System enables you to take your
organization online and improve its effectiveness and quality of work. Managing the
key processes efficiently is the key to the success of an organization.
1.2 Problem Introduction:
Lack of immediate information: -

The information is very difficult to retrieve and to find particular information like-
E.g. - To find out about the room’s history, the user has to go through various
registers. This results in inconvenience and wastage of time.

Lack of immediate information storage: -

The information generated by various transactions takes time and effort to be stored at the right
place.

Lack of prompt updating: -

Various changes to information like room’s details or customers are difficult to make
as paperwork isinvolved.

Error prone traditional calculation: -

Traditional calculations are error prone and take a lot of time this may result in
incorrect information. For example, calculation of a room's bills.

Preparation of accurate and prompt reports: -

This becomes a difficult task as information is difficult to collect from various registers.

Objective: -
1) Define hotel
2) Recording information about the customers that come.
3) Generating bills.
4) Recording information related to rooms given to customers.
5) Keeping record of the current status of rooms.

These are the various jobs that need to be done in a hotel by the operational staff.
Traditionally, all these works are done on paper.
Scope of the Project: -

1) Information about customers is gathered by just writing the customer’s


name, address and mobile. Whenever the customer comes up his/her
information is stored freshly.
2) Bills are generated by recording the price for each facility provided to
customers on a separate sheet and at last they all are summed up.
3) Number of days for which rooms are occupied is generally recorded on the
document, which contains customer information. It is destroyed after some
time period to decrease the paper load in the office.
4) Records of vacant rooms are maintained in separate sheets, which are kept in a file

All this work is done manually by the receptionist and other operational staff and a
lot of papers areneeded to be handled and taken care of.

1.3 MODULES:

Hotel Management System is a software application for hotels which manages


doctors and patients.In this project, we use Python, tkinter and SQLite databases.

The entire project mainly consists of 3 modules, which are

❖ Customer module

❖ Room module

Customer module:

1. Basically there are two things that the user is supposed to do i.e. check in and check out.
2. Check in means a user is assigned a room.
3. Check out means the user vacates the room.
1. Below is check in UI.
5.) Below is check out UI.
1.3.2 Room module:

1) Basically room number is necessary when assigning a user a room.


2) Room number is also necessary when the user vacates the room, it is the room
which is the only fieldrequired rather than the user's details.
3) Before assigning rooms its availability is also checked, which is checked by below UI.

4.) Above UI shows information of customer’s to which room is assigned.


REQUIREMENT SPECIFICATION
2.1 INTRODUCTION:

To be used efficiently, all computer software needs certain hardware components or


the other software resources to be present on a computer. These prerequisites are
known as(computer) system requirements and are often used as a guideline as
opposed to an absolute rule. Most software defines two sets of system requirements:
minimum and recommended. With increasing demand for higher processing power
and resources in newer versions of software, system requirements tend to increase
over time. Industry analysts suggest that this trend plays a bigger part in driving
upgrades to existing computer systems than technological advancements.

HARDWARE REQUIREMENTS:
The most common set of requirements defined by any operating system or software
application is the physical computer resources, also known as hardware. A hardware
requirements list is often accompanied by a hardware compatibility list (HCL),
especially in case of operating systems. An HCL lists tested, compatibility and
sometimes incompatible hardware devices for a particular operating system or
application. The following subsections discuss the various aspects of hardware
requirements.

2.2 HARDWARE REQUIREMENT:

I 3 Processor Based Computer or higher

Monitor, Keyboard, Mouse.

Memory: 1 GB RAM.

Hard Drive: 50 GB.

System Type: Atleast 32 bit operating system.

2.3 SOFTWARE REQUIREMENTS:

Windows (7/8/10) or Linux

Web technology - Python

Front-End - Python

Back-End – Python
ANALYSIS

3.1 EXISTING SYSTEM:


Hotels currently use a manual system for the management and maintenance of
room’s and customer’s information. The current system requires numerous paper
forms, with data stores spread throughout the hotel management infrastructure. Often
information is incomplete or does not follow management standards. Forms are often
lost in transit between departments requiring a comprehensive auditing process to
ensure that no vital information is lost. Multiple copies of the same information exist
in thehotel and may lead to inconsistencies in data in various data stores.

3.2 PROPOSED SYSTEM:


The Hotel Management System is designed for any hotel to replace their existing manual paper-based
system. The new system is to control the information of rooms. These services are to be provided in an
efficient, cost-effective manner, with the goal of reducing the time and resources currently required for
such tasks.

3.3 FEASIBILITY STUDY:


The feasibility of the project is analyzed in this phase and a business proposal is put
forth with a very general plan for the project and some cost estimates. During system
analysis the feasibility study of the proposed system is to be carried out. This is to
ensure that the proposed system is not a burden to the company. For feasibility
analysis, some understanding of the major requirements for the system is essential.
Three key considerations involved in the feasibility analysis are:
3.3.1 Economic Feasibility:
This study is carried out to check the economic impact the system will have on the
organization. The amount of funds that the hotel can pour into the research and
development of the system is limited. The expenditures must be justified. Thus, the
developed system as well within the budget and this was achieve

3.3.2 Technical Feasibility


This study is carried out to check the technical feasibility, that is, the technical
requirements of the system. Any system developed must not have a high demand on
the available technical resources. This will lead to high demands being placed on the
client. The developed system must have a modest requirement, as only minimal or
nullchanges are needed for implementing this system.

3.3.3 Operational Feasibility


The aspect of study is to check the level of acceptance of the system by the
user. This includes the process of training the user to use the system efficiently.
The user must not feel threatened by the system, instead must accept it as a
necessity. The level of acceptance by the users solely depends on the methods
that are employed to educate the user about the system and to make him
familiar with it. His level of confidence must be raised so that he is also able to
make some constructive criticism, which is welcomed, as he is the final user of
the system.

3.4 SOFTWARE SPECIFICATION

Python :
 Python is an interpreted, object-oriented, high-level programming language
with dynamic semantics.
 Its high-level built in data structures, combined with dynamic typing and dynamic
binding, make it very attractive for Rapid Application Development, as well as for use
as a scripting or glue language to connect existing components together.
 Python's simple, easy to learn syntax emphasizes readability and therefore reduces
the cost of program maintenance. Python supports modules and packages, which
encourages program modularity and code reuse.
 The Python interpreter and the extensive standard library are available in source or
binary formwithout charge for all major platforms, and can be freely distributed.
 Python is an open-source general-purpose interpreted programming language
available for themost popular operating systems.
 The current versions are 3.x while 2.x is no longer supported, since 2020. This book
describes primarily the unsupported version 2 (while often the same code works in
version 3), but does at times reference changes in version 3.
 There are a few implementations for Python 3 (and older): the standard
implementation written in C, and PyPy, a JIT-compiled version written in RPython - a
subset of Python. For Python 2 only there are Python written in Java and IronPython
written in C# for the .NET environment.

Tkinter:
 The tkinter package (“Tk interface”) is the standard Python interface to the Tcl/Tk
GUI toolkit. Both Tk and tkinter are available on most Unix platforms, including
macOS, as well ason Windows systems.
 Running python -m tkinter from the command line should open a window
demonstrating a simple Tk interface, letting you know that tkinter is properly
installed on your system, and also showing what version of Tcl/Tk is installed, so you
can read the Tcl/Tk documentation specific to that version.
 Tkinter supports a range of Tcl/Tk versions, built either with or without thread
support. The official Python binary release bundles Tcl/Tk 8.6 threaded. See the
source code for the kinter module for more information about supported versions.
 Tkinter is not a thin wrapper, but adds a fair amount of its own logic to make the
experience more pythonic. This documentation will concentrate on these additions
and changes, and refer tothe official Tcl/Tk documentation for details unchanged.
SQLite :
 SQLite is a software library that implements a self-contained, serverless, zero-
configuration, transactional SQL database engine. SQLite is one of the fastest-
growing database engines around, but that's growth in terms of popularity, not
anything to do with its size. The source codefor SQLite is in the public domain.
 SQLite is an in-process library that implements a self-contained, serverless, zero-
configuration, transactional SQL database engine. It is a database, which is zero-
configured, which means like other databases you do not need to configure it in your
system.
 SQLite engine is not a standalone process like other databases, you can link it
statically or dynamically as per your requirement with your application. SQLite
accesses its storage filesdirectly.
 SQLite does not require a separate server process or system to operate (serverless).
 SQLite comes with zero-configuration, which means no setup or administration needed.
 A complete SQLite database is stored in a single cross-platform disk file.

CONNECTIVITY:
 Clients can connect to SQLite database using several protocols:

 Clients can connect using TCP/IP sockets on any platform.


 On Windows systems in the NT family (NT, 2000, XP, 2003, or Vista), clients
can connectusing named pipes if the server is started with the --enable-
named-pipe option. In SQLite
4.1 and higher, Windows servers also support shared-memory connections if
started withthe --shared-memory option. Clients can connect through shared
memory by using the
--protocol=memory option.

 On UNIX systems, clients can connect using Unix domain socket files.
 Following code section is us
conn =

sqlite3.connect('Hotel.db')

with conn:

cursor = conn.cursor()
cursor.execute(
'CREATE TABLE IF NOT EXISTS Hotel (Fullname TEXT,Address TEXT,mobile_number
TEXT,number_days TEXT,'
'room_number NUMBER)')
conn.commit()

LOCALIZATION:
 The server can provide error messages to clients in many languages.
 All data is saved in the chosen character set.
SYSTEM IMPLEMENTATION
4. IMPLEMENTATION:

4.1 Introduction:
Implementation is the stage of the project when the theoretical design is turned out into a working
system. Thus, it can be considered to be the most critical stage in achieving a successful new system and
in giving the user confidence that the new system will work and be effective.

The implementation stage involves careful planning, investigation of the existing system and
its constraints on implementation, designing of methods to achieve changeover and
evaluation of changeover methods.

4.2 SAMPLE PROGRAM:


classhotelfarecal:

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

self.cindate=cindate

self.coutdate=coutdate

self.rno=rno

definputdata(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")

defroomrent(self):#sel1353

print ("We have the following rooms for you:-")

print ("1. type A---->rs 6000 PN\-")

print ("2. type B---->rs 5000 PN\-")

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")

self.s=3000*n
else:

print ("please choose a room")

print ("your room rent is =",self.s,"\n")

defrestaurentbill(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

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):

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

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")

defgamebill(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")

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:"))

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)

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+=1

def main():

a=hotelfarecal()

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

print("2.Calculate rommrent")

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):

a.gamebill()

S if (b==6):

a.display()

if (b==7):

quit()

import random

import datetime

# Global List Declaration

name = []

phno = []

add = []
checkin = []

checkout = []

room = []

price = []

rc = []

p = []

roomno = []

custid = []

day = []

# Global Variable Declaration

i=0

# Home Function

def Home():

print("\t\t\t\t\t\t WELCOME TO HOTEL ANCASA\n")

print("\t\t\t 1 Booking\n")

print("\t\t\t 2 Rooms Info\n")

print("\t\t\t 3 Room Service(Menu Card)\n")

print("\t\t\t 4 Payment\n")

print("\t\t\t 5 Record\n")

print("\t\t\t 0 Exit\n")
ch=int(input("->"))

if ch == 1:

print(" ")

Booking()

elif ch == 2:

print(" ")

Rooms_Info()

elif ch == 3:

print(" ")

restaurant()

elif ch == 4:

print(" ")

Payment()

elif ch == 5:

print(" ")

Record()

else:

exit()
# Function used in booking

def date(c):

if c[2] >= 2019 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\n")

name.pop(i)

phno.pop(i)

add.pop(i)

checkin.pop(i)

checkout.pop(i)

Booking()
# if month is odd & less than equal

# to 7th month

elif c[1] <= 7 and c[1]%2 != 0 and c[0] <= 31:

pass

# if month is even & less than equal to 7th

# month and not 2nd month

elif c[1] <= 7 and c[1]%2 == 0 and c[0] <= 30 and c[1] != 2:

pass

# if month is even & greater than equal

# to 8th month

elif c[1] >= 8 and c[1]%2 == 0 and c[0] <= 31:

pass

# if month is odd & greater than equal

# to 8th month

elif c[1]>=8 and c[1]%2!=0 and c[0]<=30:

pass

else:

print("Invalid date\n")

name.pop(i)

phno.pop(i)
add.pop(i)

checkin.pop(i)

checkout.pop(i)

Booking()

else:

print("Invalid date\n")

name.pop(i)

phno.pop(i)

add.pop(i)

checkin.pop(i)

checkout.pop(i)

Booking()

else:

print("Invalid date\n")

name.pop(i)

phno.pop(i)

add.pop(i)

checkin.pop(i)

checkout.pop(i)

Booking()

# Booking function
def Booking():

# used global keyword to

# use global variable 'i'

global i

print(" BOOKING ROOMS")

print(" ")

while 1:

n = str(input("Name: "))

p1 = str(input("Phone No.: "))

a = str(input("Address: "))

# checks if any field is not empty

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

name.append(n)

add.append(a)

break

else:

print("\tName, Phone no. & Address cannot be empty..!!")

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])

date(ci)

coo=str(input("Check-Out: "))

checkout.append(coo)

coo=coo.split('/')

co=coo

co[0]=int(co[0])

co[1]=int(co[1])

co[2]=int(co[2])

# checks if check-out date falls after

# check-in date

if co[1]<ci[1] and co[2]<ci[2]:

print("\n\tErr..!!\n\tCheck-Out date must fall after Check-In\n")

name.pop(i)

add.pop(i)

checkin.pop(i)

checkout.pop(i)

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\n")

name.pop(i)

add.pop(i)

checkin.pop(i)

checkout.pop(i)

Booking()

else:

pass

date(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")

print(" 4. 3-Bed AC")

print(("\t\tPress 0 for Room Prices"))

ch=int(input("->"))

# if-conditions to display allotted room


# type and it's price

if ch==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("->"))

if ch==1:

room.append('Standard Non-AC')

print("Room Type- Standard Non-AC")

price.append(3500)

print("Price- 3500")

elif ch==2:

room.append('Standard AC')

print("Room Type- Standard AC")

price.append(4000)

print("Price- 4000")

elif ch==3:

room.append('3-Bed Non-AC')

print("Room Type- 3-Bed Non-AC")

price.append(4500)

print("Price- 4500")

elif ch==4:

room.append('3-Bed AC')

print("Room Type- 3-Bed AC")


price.append(5000)

print("Price- 5000")

else:

print(" Wrong choice..!!")

# randomly generating room no. and customer

# id for customer

rn = random.randrange(40)+300

cid = random.randrange(40)+10

# checks if allotted room no. & customer

# id already not allotted

while rn in roomno or cid in custid:

rn = random.randrange(60)+300

cid = random.randrange(60)+10

rc.append(0)

p.append(0)

if p1 not in phno:

phno.append(p1)

elif p1 in phno:

for n in range(0,i):

if p1== phno[n]:

if p[n]==1:

phno.append(p1)

elif p1 in phno:
for n in range(0,i):

if p1== phno[n]:

if p[n]==0:

print("\tPhone no. already exists and payment yet not done..!!")

name.pop(i)

add.pop(i)

checkin.pop(i)

checkout.pop(i)

Booking()

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:

Home()

else:

exit()

# ROOMS INFO

def Rooms_Info():

print(" ------ HOTEL ROOMS INFO ------")

print("")
print("STANDARD NON-AC")

print("---------------------------------------------------------------")

print("Room amenities include: 1 Double Bed, Television, Telephone,")

print("Double-Door Cupboard, 1 Coffee table with 2 sofa, Balcony and")

print("an attached washroom with hot/cold water.\n")

print("STANDARD NON-AC")

print("---------------------------------------------------------------")

print("Room amenities include: 1 Double Bed, Television, Telephone,")

print("Double-Door Cupboard, 1 Coffee table with 2 sofa, Balcony and")

print("an attached washroom with hot/cold water + Window/Split AC.\n")

print("3-Bed NON-AC")

print("---------------------------------------------------------------")

print("Room amenities include: 1 Double Bed + 1 Single Bed, Television,")

print("Telephone, a Triple-Door Cupboard, 1 Coffee table with 2 sofa, 1")

print("Side table, Balcony with an Accent table with 2 Chair and an")

print("attached washroom with hot/cold water.\n")

print("3-Bed AC")

print("---------------------------------------------------------------")

print("Room amenities include: 1 Double Bed + 1 Single Bed, Television,")

print("Telephone, a Triple-Door Cupboard, 1 Coffee table with 2 sofa, ")

print("1 Side table, Balcony with an Accent table with 2 Chair and an")

print("attached washroom with hot/cold water + Window/Split AC.\n\n")

print()

n=int(input("0-BACK\n ->"))

if n==0:
Home()

else:

exit()

# RESTAURANT FUNCTION

def restaurant():

ph=int(input("Customer Id: "))

global i

f=0

r=0

for n in range(0,i):

if custid[n]==ph and p[n]==0:

f=1

print("-------------------------------------------------------------------------")

print(" Hotel AnCasa")

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 ROTI")

print(" 4 Cold Drink.............. 25.00 ----------------------------------")

print(" 5 Bread Butter............ 30.00 29 Plain Roti.............. 15.00")


print(" 6 Bread Jam............... 30.00 30 Butter Roti............. 15.00")

print(" 7 Veg. Sandwich........... 50.00 31 Tandoori Roti........... 20.00")

print(" 8 Veg. Toast Sandwich..... 50.00 32 Butter Naan............. 20.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............. 100.00")

print(" MAIN COURSE 38 Onion Dosa.............


110.00")

print("---------------------------------- 39 Masala Dosa............ 130.00")

print(" 16 Shahi Paneer........... 110.00 40 Paneer Dosa............ 130.00")

print(" 17 Kadai Paneer........... 110.00 41 Rice Idli.............. 130.00")

print(" 18 Handi Paneer........... 120.00 42 Sambhar Vada........... 140.00")

print(" 19 Palak Paneer........... 120.00")

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 Jeera Aloo............. 140.00 44 Strawberry.............. 60.00")

print(" 24 Malai Kofta............ 140.00 45 Pineapple............... 60.00")

print(" 25 Aloo Matar............. 140.00 46 Butter Scotch........... 60.00")

print("Press 0 -to end ")

ch=1

while(ch!=0):

ch=int(input(" -> "))

# if-elif-conditions to assign item

# prices listed in menu card

if ch==1 or ch==31 or ch==32:

rs=20

r=r+rs

elif ch<=4 and ch>=2:

rs=25

r=r+rs

elif ch<=6 and ch>=5:

rs=30

r=r+rs

elif ch<=8 and ch>=7:

rs=50

r=r+rs

elif ch<=10 and ch>=9:

rs=70
r=r+rs

elif (ch<=17 and ch>=11) or ch==35 or ch==36 or ch==38:

rs=110

r=r+rs

elif ch<=19 and ch>=18:

rs=120

r=r+rs

elif (ch<=26 and ch>=20) or ch==42:

rs=140

r=r+rs

elif ch<=28 and ch>=27:

rs=150

r=r+rs

elif ch<=30 and ch>=29:

rs=15

r=r+rs

elif ch==33 or ch==34:

rs=90

r=r+rs

elif ch==37:

rs=100

r=r+rs

elif ch<=41 and ch>=39:

rs=130

r=r+rs
elif ch<=46 and ch>=43:

rs=60

r=r+rs

elif ch==0:

pass

else:

print("Wrong Choice..!!")

print("Total Bill: ",r)

# updates restaurant charges and then

# appends in 'rc' list

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:

Home()

else:

exit()

# PAYMENT FUNCTION
def Payment():

ph=str(input("Phone Number: "))

global i

f=0

for n in range(0,i):

if ph==phno[n] :

# checks if payment is

# not already done

if p[n]==0:

f=1

print(" Payment")

print(" --------------------------------")

print(" MODE OF PAYMENT")

print(" 1- Credit/Debit Card")

print(" 2- Paytm/PhonePe")

print(" 3- Using UPI")

print(" 4- Cash")

x=int(input("-> "))

print("\n Amount: ",(price[n]*day[n])+rc[n])

print("\n Pay For AnCasa")

print(" (y/n)")
ch=str(input("->"))

if ch=='y' or ch=='Y':

print("\n\n --------------------------------")

print(" Hotel AnCasa")

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: \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)

# pops room no. and customer id from list and

# later assigns zero at same position

roomno.pop(n)
custid.pop(n)

roomno.insert(n,0)

custid.insert(n,0)

else:

for j in range(n+1,i):

if ph==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:

Home()

else:

exit()

# RECORD FUNCTION

def Record():
# checks if any record exists or not

if phno!=[]:

print(" *** HOTEL RECORD ***\n")

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:

Home()

else:

exit()
DESIGN
5.1 SYSTEM DESIGN:
5.1.1 INTRODUCTION TO UML:

UML Design

The Unified Modeling Language (UML) is a standard language for specifying, visualizing, constructing,
and documenting the software system and its components. It is a graphical language, which provides a
vocabulary and set of semantics and rules. The UML focuses on the conceptual and physical
representation of the system. It captures the decisions and understandings about systems that must be
constructed. It is used to understand, design, configure, maintain, and control information about the
systems.

The UML is a language for:


 Visualizing
 Specifying
 Constructing
 Documenting
Visualizing
Through UML we see or visualize an existing system and ultimately, we visualize how the
system is going to be after implementation. Unless we think, we cannot implement. UML
helps to visualize how the components of the system communicate and interact with each
other.

Specifying
Specifying means building models that are precise, unambiguous and complete UML
addresses the specification of all the important analysis design, implementation decisions
thatmust be made in developing and deploying a software system.

Constructing
UML models can be directly connected to a variety of programming language through
mapping a model from UML to a programming language like JAVA or C++ or VB. Forward
Engineering and Reverse Engineering is possible through UML.

Documenting
The Deliverables of a project apart from coding are some Artifacts, which are critical in
controlling, measuring and communicating about a system during its developing
requirements, architecture, desire, source code, project plans, tests, prototypes, releases, etc...
5.1 UML Approach
UML Diagram

A diagram is the graphical presentation of a set of elements, most often rendered as a connected graph of
vertices and arcs. you draw a diagram to visualize a system from a different perspective, so a diagram is a
projection into a system. For all but most trivial systems, a diagram represents an elided view of the elements
that make up a system. The same element may appear in all diagrams, only a few diagrams, or in no diagrams at
all. In theory, a diagram may contain any combination of things and relationships. In practice,however, a small
number of common combinations arise, which are consistent with the five most useful views that comprise the
architecture of a software-intensive system.

USE CASE DIAGRAM:


A use case diagram in the Unified Modeling Language (UML) is a type of behavioral
diagram defined by and created from a use-case analysis. Its purpose is to present a
graphical overview of the functionality provided by a system in terms of actors, their goals
(represented as use cases), and any dependencies between those use cases.

Use case diagrams are formally included in two modeling languages defined by the OMG:
ER Diagram
TESTING
6.1 INTRODUCTION TO SYSTEM TESTING:
The purpose of testing is to discover errors. Testing is the process of trying to discover every
conceivable fault or weakness in a work product. It provides a way to check the functionality
of components, sub-assemblies, assemblies and/or a finished product It is the process of
exercising software with the intent of ensuring that the Software system meets its
requirements and user expectations and does not fail in an unacceptable manner. There are
various types of tests. Each test type addresses a specific testing requirement.

6.2 TYPES OF TESTING:

Unit testing:
Unit testing involves the design of test cases that validate that the internal program logic is
functioning properly, and that program inputs produce valid outputs. All decision branches
and internal code flow should be validated. It is the testing of individual software units of
the application.
It is done after the completion of an individual unit before integration. This is a structural
testing that relies on knowledge of its construction and is invasive. Unit tests perform basic
tests at component level and test a specific business process, application, and/or system
configuration. Unit tests ensure that each unique path of a business process performs
accurately to the documented specifications and contains clearly defined inputs and expected
results.

Integration testing:
Integration tests are designed to test integrated software components to determine if they
actually run as one program. Integration tests demonstrate that although the components
were individually satisfactory, as shown by successfully unit testing, the combination of
components is correct and consistent. Integration testing is specifically aimed at exposing
the problems that arise from the combination of components.
Functional test:

Functional tests provide systematic demonstrations that functions tested are available as
specified by the business and technical requirements, system documentation, and user
manuals.

Functional testing is centered on the following items:

Valid Input: identified classes of valid input must be

accepted.

Invalid Input: identified classes of invalid input must be

rejected.

Functions : identified functions must be exercised.

Output: identified classes of application outputs must be

exercised.

Systems/Procedures: interfacing systems or procedures must be

invoked.

Organization and preparation of functional tests is focused on requirements, key functions,


or special test cases. In addition, systematic coverage pertaining to identifying Business
process flows; datafields, predefined processes, and successive processes must be considered
for testing. Before functional testing is complete, additional tests are identified and the
effective value of current tests is determined.

System Test:
System testing ensures that the entire integrated software system meets requirements. It tests a
configuration to ensure known and predictable results. An example of system testing is the
configuration oriented system integration test. System testing is based on process
descriptions and flows, emphasizing pre-driven process links and integration points.

White Box Testing:


White Box Testing is a testing in which the software tester has knowledge of the inner
workings, structure and language of the software, or at least its purpose. It has a purpose. It
is used to test areas that cannot be reached from a black box level.
Black Box Testing:

Black Box Testing is testing the software without any knowledge of the inner workings,
structure or language of the module being tested. Black box tests, as most other kinds of
tests, must be written from a definitive source document, such as specification or
requirements document, such as specification or requirements document. It is a test in which
the software under test is treated as a black box. you cannot “see” into it. The test provides
inputs and responds to outputs without considering how the software works.

Unit Testing:
Unit testing is usually conducted as part of a combined code and unit test phase of the
software lifecycle, although it is not uncommon for coding and unit testing to be conducted
as two distinct phases.

Test strategy and approach


Field testing will be performed manually and functional tests will be written in detail.

Test objectives

 All field entries must work properly.


 Pages must be activated from the identified link.
 The entry screen, messages and responses must not be delayed.

Features to be tested

 Verify that the entries are of the correct format.


 No duplication entries should be allowed.
 All links should take the user to the correct page.

Integration Testing:

Software integration testing is the incremental integration testing of two or more integrated
software components on a single platform to produce failures caused by interface defects.
The task of the integration test is to check that components or software applications, e.g.
components in a software system or – one step up – software applications at the company
level – interact without error.

Test Results:
All the test cases mentioned above passed successfully. No defects encountered.
SAMPLE SCREENSHOTS
CUSTOMER DATA:
ROOM RENT BILL:
RESTAURANT BILL:
LAUNDRY BILL:
GAME BILL:
TOTAL COST:

You might also like