Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

C S (Sahil)

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

AMBUJA VIDYA NIKETAN

UPPARWAHI

PROJECT ON HOTEL MANAGEMENT SYSTEM

NAME:- Sahil Mohammed

CLASS:- 12TH (Science)

SUBJECT:-Computer Science (083)

GUIDED BY:- MR. Ravi Kumar Sharma

ACADEMIC YEAR :- 2022-2023


INDEX
1) Certificate

2) Acknowledgement

3) Project Background

4) Software Requirements

5) Module Definition

6) Coding

7) Output Screens

8) Testing Technology used…

9) References
Certificate
This is to certify that Sahil Mohammed of
class XII Science of Ambuja Vidya
Niketan, Upparwahi has completed his
project under the supervision of Mr. Ravi
Kumar Sharma & Mr. Rajesh Sharma
sir. He has taken care and shown sincerity
in completion of this project.

I hereby certify that this project is upto my


expectations and guidance issued by
CBSE.

External examiner Internal examiner


(Signature) (Signature)

Principal’s signature
Acknowledgement

I would like to express my special


thanks of gratitude to my teacher Mr.
Ravi Kumar Sharma as well as our
principal Mr. Rajesh Sharma who
gave me the golden opportunity to do
this wonderful project on the topic
Hotel Management System, which also
helped me in doing a lot of Research
and i came to know about so many new
things I am really thankful to them.

Secondly i would also like to thank my


parents and friends who helped me a lot
in finalizing this project within the
limited time frame.
OBJECTIVE

The main objective of the project is Synopsis


of hotel booking system, management of the
details of hotel, rooms, services, payments,
bookings etc. It manages all the information
about the hotel, customers, bookings…

The Project is totally built at administrative


end and thus only the administrator is granted
the access. The purpose of the project is to
build an application program to reduce the
manual work for the management of hotel,
rooms, customer’s details, and services. It
tracks all the details about the services,
payments & bookings …
Software and Hardware

Software:-

We have selected python language for doing front


end coding and MYSQL for backend data storage
and processing.

Hardware:-

Hardware Minimum Requirement


Display CRT Monitor
Processor Intel Pentium
Keyboard & Mouse Any
RAM 512Mb
ROM 500Mb
Operating system Windows 7
Module Definitions
Main Module:
The main menu contains 3 modules which are Room
menu, Customer menu , and Report menu which
enables us to perform different types of operations to
perform.

Sub Modules:
Room menu:
It has total 6 menus that allow us to add/edit data in
vacancy table.
1) Insertinvacancy: To add data about the rooms
number, type , price, and availability in vacancy
table.

2) Updateroom: It has to child menus which enable


us to update the status and price of the rooms.

I. Updatestatus: To update the status of the


room.

II. Updateprice: To update the price of the room.


3) Deletevacancy: This will delete a record from the
vacancy table…

4) Displayvacancy: This will display the details of


the rooms present in hotel.

5) Roombooking: This will add the details of the


customers who will book the rooms and store it in
customer table.

6) Enquiry: This will display the necessary


information about the rooms so that customer can
book them.

Customer Menu:
It has 3 menus which allow us to update, delete and
view the details of customers that are stored in the
customer table.
1) Updatecustomer: This allows us to update the
checkout date of a particular customer.

2) Deletecustomer: This allows us to delete the


details of a customer in the customer table.

3) Displaycustomer: This enables us to display the


details of the customers from customers table.
Report menu:

It has 3 Sub menus which help us to fetch information


about the rooms, service, status, availability, customer
details etc.
1) Roomreport: It has 2 Child menus…

I. Vacantrooms: It shows us the vacant rooms


available for booking.

II. Occupiedrooms: It shows us the occupied


rooms.

III. Floorwise: It shows us rooms as per the floor


numbers.

2) Customerreport:

I. Customers: It shows the names of customers


present in the hotel.

II. Duration: It shows the dates of check in and


checkout so as to keep a record for future
bookings.
TABLES

Vacancy Table
Customer table
Code
import mysql.connector
from tabulate import tabulate
import pyfiglet

con=mysql.connector.connect(host='localhost',
database='hotel',
user='root',
password='sqlpass')
if con.is_connected():

print(pyfiglet.figlet_format("Welcome",font="starwars",justify="cent
er"))

else:
print("No Database found.")

def updatestatus():
RoomNO=int(input("Enter the Room number whose status you
have to change"))
status=input("Enter whether the room is vacant or occupied-")
query="update vacancy set Vacancy='{}' where
RoomNO={}".format(status,RoomNO)
cur=con.cursor()
cur.execute(query)
con.commit()
def updateprice():

RoomNO=int(input("Enter the Room number whose status you


have to change"))
price=int(input("Enter the price of the room-"))
query="update vacancy set Price='{}' where
RoomNO={}".format(price,RoomNO)
cur=con.cursor()
cur.execute(query)
con.commit()

def insertinvacancy():
RoomNO=int(input("Enter the Room number"))
Roomtype=input("Enter the room type")
Vacancy=input("Enter whether the room is vacant or occupied ")
FloorNO=int(input("Enter the floor NO"))
Price=int(input("Enter the Price of the room"))
query="insert into vacancy
values({},'{}','{}',{},{})".format(RoomNO,Roomtype,Vacancy,Floor
NO,Price)
cur=con.cursor()
cur.execute(query)
con.commit()
def updateroom():

choice=0
while choice!=3:
print("_________Enter the Choice__________")
print("1. To Update the status of the room...")
print("2. To Update the price of the room...")
print("3. Exit")
choice=int(input("Enter your choice -"))
if choice==1:
updatestatus()
elif choice==2:
updateprice()
elif choice==3:
exit

def deletevacancy():
r=int(input("Enter the room number of the record to be deleted"))
query="delete from vacancy where RoomNO={}".format(r)
cur=con.cursor()
cur.execute(query)
con.commit()

def displayvacancy():
l=[]
cur=con.cursor()
cur.execute("Select * from vacancy")
data=cur.fetchall()
for i in data:

l.append([i[0],i[1],i[2],i[3],i[4]])
print(tabulate(l,headers=["Room Number","Room
Type","Status","Floor no.","Price"],tablefmt="pretty"))
def Roombooking():
cur1=con.cursor()
Customer_name=input("Enter name of the customer")
Room_NO=int(input("Enter the room number"))
Checkin=input("Enter the date")
Checkout=input("Enter the date")
Phone_NO=int(input("Enter the Phone number"))
Aadhar_1=int(input("Enter the first four digits"))
Aadhar_2=int(input("Enter the digits"))
Aadhar_3=int(input("Enter the digits"))
query="insert into customer
values('{}',{},'{}','{}',{},{},{},{})".format(Customer_name,Room_N
O,Checkin, Checkout,Phone_NO, Aadhar_1,Aadhar_2,Aadhar_3)
cur=con.cursor()
cur.execute(query)
a="occupied"
cur1.execute("update vacancy set Vacancy=%s where
Room_NO=%s",(a,Room_NO))

con.commit()
print("Your room has been booked and your number
is",Room_NO)
def displaycustomer():
l=[]
cur=con.cursor()
cur.execute("Select * from customer")
data=cur.fetchall()
for i in data:

l.append([i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7]])
print(tabulate(l,headers=["Customer Name","Room No.","Checkin
Date","Checkout Date","Phone
No.","AadharNO.1","AadharNO.2","AadharNO.3"],tablefmt="pretty"
))

def deletecustomer():
r=int(input("Enter the Room number of Record to be deleted..."))
query="delete from customer where Room_NO={}".format(r)
cur=con.cursor()
cur.execute(query)
con.commit()
def updatecustomer():
RoomNO=int(input ("Enter the room number whose checkout date
is to be changed-"))
Date=input("Enter the date of checkout-")
query="update customer set Checkout='{}' where
Room_NO={}".format(Date,RoomNO)
cur=con.cursor()
cur.execute(query)
con.commit()

def Enquiry():
l=[]
cur=con.cursor()
cur.execute("Select RoomNO,Roomtype,Vacancy,Price from
vacancy ")
data=cur.fetchall()
for i in data:
l.append([i[0],i[1],i[2],i[3]])
print(tabulate(l,headers=["Room Number","Room
Type","Status","Price"],tablefmt="pretty"))

def vacantrooms():
l=[]
cur=con.cursor()
cur.execute("Select RoomNO,Vacancy from vacancy where
Vacancy='vacant'")
data=cur.fetchall()
for i in data:
l.append([i[0],i[1]])
print(tabulate(l,headers=["Room
Number","Status"],tablefmt="pretty"))

def occupiedrooms():
l=[]
cur=con.cursor()
cur.execute("Select RoomNO,Vacancy from vacancy where
Vacancy='occupied'")
data=cur.fetchall()
for i in data:
l.append([i[0],i[1]])
print(tabulate(l,headers=["Room
Number","Status"],tablefmt="pretty"))
def Floorwise():
n=int(input("Enter the floor no."))
l=[]
cur=con.cursor()
cur.execute("Select RoomNO,Vacancy from vacancy where
FloorNO=%s",(n,))
data=cur.fetchall()
for i in data:
l.append([i[0],i[1]])
print(tabulate(l,headers=["Room
Number","Status"],tablefmt="pretty"))

def customers():

l=[]
cur=con.cursor()
cur.execute("Select Customer_name,Room_NO from customer")
data=cur.fetchall()
for i in data:
l.append([i[0],i[1]])
print(tabulate(l,headers=["Customer Name","Room
number"],tablefmt="pretty"))
def Duration():
l=[]
cur=con.cursor()
cur.execute("Select Customer_name,Checkin,Checkout from
customer")
data=cur.fetchall()
for i in data:
l.append([i[0],i[1],i[2]])
print(tabulate(l,headers=["Name of Customer","Check in
Date","Check out Date"],tablefmt="pretty"))

def Customerreport():
choice=0
while choice!=4:
print("_________Enter the Choice__________")
print("1. To get the names of customers...")
print("2. To Know the duration till when the room is booked...")

print("3. Back...")
choice=int(input("Enter your choice -"))
if choice==1:
customers()
elif choice==2:
Duration()
elif choice==3:
exit

def Roomreport():
choice=0
while choice!=4:
print("_________Enter the Choice__________")
print("1. To get number of vacant rooms...")
print("2. To get number of occupied rooms...")
print("3. To get the info of rooms floor wise...")
print("4. Back...")
choice=int(input("Enter your choice -"))
if choice==1:
vacantrooms()
elif choice==2:
occupiedrooms()
elif choice==3:
Floorwise()

elif choice==4:
exit
def Reportmenu():
choice=0
while choice!=3:

print("_________Enter the Choice__________")


print("1. To fetch room report...")
print("2. To fetch customer report...")
print("3. Back...")
choice=int(input("Enter your choice -"))
if choice==1:

Roomreport()
elif choice==2:
Customerreport()
elif choice==3:
exit

def Roommenu():
choice=0
while choice!=7:
print("_________Enter the Choice__________")
print("1. To Insert a record in vacancy table...")
print("2. To Update a record in vacancy table...")
print("3. To Delete a record from vacancy table...")
print("4. To Display records of vacancy table...")
print("5. To Insert the required information for booking...")
print("6. To fetch details for booking...")
print("7. Back...")
choice=int(input("Enter your choice -"))
if choice==1:
insertinvacancy()
elif choice==2:
updateroom()
elif choice==3:
deletevacancy()
elif choice==4:
displayvacancy()
elif choice==5:
Roombooking()
elif choice==6:
Enquiry()
elif choice==7:
exit
else:
print("Invalid Choice")
break
def Customermenu():
choice=0
while choice!=4:

print("_________Enter the Choice__________")


print("1. To Update a record in customer table...")
print("2. To Delete a record from customer table...")
print("3. To Display records of customer table...")
print("4. Back...")
choice=int(input("Enter your choice -"))

if choice==1:
updatecustomer()
elif choice==2:
deletecustomer()
elif choice==3:
displaycustomer()
elif choice==4:

exit
else:
print("Invalid Choice")
break
def mainmenu():
choice=0
while choice!=4:

print("_________Enter the Choice__________")


print("1. Access Room menu...")
print("2. Access Customer menu...")
print("3. Access Report menu...")
print("4. Quit...")
choice=int(input("Enter your choice -"))
if choice==1:
Roommenu()
elif choice==2:
Customermenu()
elif choice==3:
Reportmenu()

elif choice==4:
print("......Program Finished......")
exit
else:
print("Invalid Choice")
break
mainmenu()
Output Screens

Home screen
Room Menu
Insert in Vacancy Table
Update status
Update price

Delete record
Display records
Room booking
Enquiry
Customer Menu

Update record
Delete Record

Display records
Report Menu
Room report
Vacant rooms
Occupied rooms

Floor wise
Customer Report
Name of customers

Duration of stay
Testing Technology
Used:-
Black Box Testing
Black-Box testing is a method of software testing
that examines the functionality of an application
based on the specifications. Black Box testing
gives abstraction from code and focuses on testing
effort on the software system behaviour. It is also
known as Specifications based testing.
Independent testing team usually performs this
type of testing during the software testing cycle.
This method of test can be applied to each and
every level of software testing such as unit,
integration, system and acceptance testing.

White Box Testing


White box testing techniques analyse the internal
structures the used data structures, internal design,
code structure, and the working of the software rather
than just the functionality as in black box testing. It is
also called glass box testing or clear box testing or
structural testing. White Box Testing is also known as
transparent testing, open box testing.
References

Websites:-
 https://www.w3schools.com/

 https://www.tutorialspoint.com/sq
l/sql-update-query.htm

 https://www.freecodecamp.org/ne
ws/sql-update-statement-update-
query-in-sql/

Books:-
 Computer Science with Python
For class 12th .
Book by: Sumita Arora

You might also like