Final Project

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

PODAR INTERNATIONAL SCHOOL

PROJECT REPORT
ON
“Hotel Management System”

SUBMITTED BY: SUBMITTED TO:

Ved , Dhruv Pooja Mam


XII(A) Comp.Sci.Deptt.
BONAFIED CERTIFICATE

This is to certify that this project report on the topic ‘Hotel


Management System‘ is the bonafied work of Ved ,
Dhruv, Student of Class - XII(A). This report is submitted
as a part of the Practical Examination in Computer Science
for the session 2024-25.

____________
Signature :-
Teacher name :- Pooja
HOD-CS Deptt.:-
ACKNOWLEDGEMENT

On the auspicious occasion of submitting my


Computer Project, I am deeply obliged and thankful to my
Computer Science Teacher Mrs. Poojawithout the righteous
and guided assistance of whom, this project would not
have seen the daylight. He devoted his precious time in
bringing my work to this stature. I also pay thanks to my
parents , our Principal Sir Mr. Vinay Upadhaya for giving
me full support throughout the completion of my project.

Ved Dhruv
XII(A)
Index
S.No Contents Page#

1 Overview of Python 5-6

2 Need for the Project/User 7-8

manual

3 Module Used 9-9

4 Basic Concept 10- 12

5 Source Code 13 -
26
OVERVIEW OF PYTHON
Python is a high-level, interpreted, interactive and object-
oriented scripting language. Python is designed to be
highly readable. It uses English keywords frequently where
as other languages use punctuation, and it has fewer
syntactical constructions than other languages.

● Python is Interpreted − Python is processed at runtime


by the interpreter. You do not need to compile your
program before executing it. This is similar to PERL
and PHP.

● Python is Interactive − You can actually sit at a Python


prompt and interact with the interpreter directly to
write your programs.

● Python is Object-Oriented − Python supports Object-


Oriented style or technique of programming that
encapsulates code within objects.

● Python is a Beginner's Language − Python is a great


language for the beginner-level programmers and
supports the development of a wide range of
applications from simple text processing to WWW
browsers to games.

Python Features
Python's features include −
● Easy-to-learn − Python has few keywords, simple
structure, and a clearly defined syntax. This allows
the student to pick up the language quickly.

● Easy-to-read − Python code is more clearly defined


and visible to the eyes.
● Easy-to-maintain − Python's source code is fairly easy-
to- maintain.
● A broad standard library − Python's bulk of the library
is very portable and cross-platform compatible on
UNIX, Windows, and Macintosh.

● Interactive Mode − Python has support for an


interactive mode which allows interactive testing and
debugging of snippets of code.

● Portable − Python can run on a wide variety of


hardware platforms and has the same interface on all
platforms.

● Extendable −You can add low-level modules to the


Python interpreter. These modules enable
programmers to add to or customize their tools to be
more efficient.

● Databases − Python provides interfaces to all major


commercial databases.

● GUI Programming − Python supports GUI applications


that can be created and ported to many system calls,
libraries and windows systems, such as Windows MFC,
Macintosh, and the X Window system of Unix.

● Scalable − Python provides a better structure and


support for large programs than shell scripting.

Apart from the above-mentioned features, Python has a big


list of good features, few are listed below –

● It supports functional and structured programming


methods as well as OOP.

● It can be used as a scripting language or can be


compiled to byte-code for building large applications.

● It provides very high-level dynamic data types and


supports dynamic type checking.
● It supports automatic garbage collection.
Need for the Project
(User Manual)
This project is basically designed for users to deal with their money.
In daily tasks, it not possible to go to bank everyday and make a chaos
over their. So it is important to have an atm card so that paper work
could be reduced and it could be done through atm. Some common task
performed while working on atm :

1. Inputting name and pin code.


2. Getting total amount present in your account.
3. Withdrawing Money.
4. Taking a loan and things like changing pin code.

The entire above task are very common in atm system. This project is
created for users to directly deal with their money.

In this project we have included the entire basic requirement as


demanded by the system in day to day tasks. Using this we can easily
perform the following tasks under a prescribed main menu of the
project:

MAIN MENU

01. WELCOME MENU


02. ENTRY/EDIT MENU/EXIT
Select Your Option (1-2)

Option 1: In this option:-

(1).it will welcome the user.

(2).it will ask for username and pin code.


Option 2: In this option

(1). Provide balance in your account.

(2). Help user to withdraw cash.

(3). Provide user with lodgements.

(4). Change user pin.

(5). Exit the program.


Modules Used
The following Modules are used for different function used in my
project:-

Modules Respective
Functions/objects
Mysql.connetor A "MySQL connector module" is a
software component that allows
applications written in a specific
programming language (like Python) to
connect to and interact with a MySQL
database, essentially acting as a bridge
to send and receive data between the
application and the database server; it
enables you to execute SQL queries,
retrieve results, and manage data
within your application by providing a
programming interface to access
MySQL features.
Advantages & Special Features of the
System

1. Save time on admin tasks

2. Increase your online visibility

3. Implement an effective revenue


management system

4. Accurate daily reports

5. Prevent double bookings and manual


errors
Limitations of the Project

1.High maintainance cost


2. Increase complexity
3.Increase dependency on technology
Future Extension

 Developing multifunctional ATMs that


can help patrons pay bills.
 Currency exchange.
 ATMs having small facilities like fast
mobile phone charging.
 Having facilities like video conference
with a live teller as needed.
 Banks can extend by upgrading ATMs
which also receive checks and cash
deposits.
 ATMs that work on a biometric
technology.
Source Code
import mysql.connector as mycon
con=mycon.connect(host="localhost",user="root
",password="0720",database="hotel")
def showmenu():
while True:
print("@" * 30)
print("---- HOTEL ZED+ ----")
print("@" * 30)
print("Press 1 - Create a New Room")
print("Press 2 - Show All Rooms")
print("Press 3 - Show All Vacant Rooms")
print("Press 4 - Show All Occupied Rooms")
print("Press 5 - Book a Room")
print("Press 6 - Check Out")
print("Press 7 - Exit")
choice = int(input("Enter your choice : "))
if choice == 1:
createRoom()
elif choice == 2:
showRooms()
elif choice == 3:
showVacantRooms()
elif choice == 4:
showOccupiedRooms()
elif choice == 5:
bookRoom()
elif choice == 6:
checkout()
elif choice == 7:
break
def createRoom():
print(" --- ENTER ROOM DETAILS --- ")
rno = int(input("Enter Room No. : "))
type = input("Enter Room
Type(Simple/Delux/Super Delux):")
guest = int(input("Enter maximum number of
guests : "))
loc = input("Enter Location details : ")
rent = int(input("Enter Per Day Charges : "))
status = "Vacant"
q = "insert into rooms values(%s,%s,%s,%s,
%s,%s)"
data = (rno,type,loc,guest,rent,status)
cr1 = con.cursor()
cr1.execute(q,data)
con.commit()
print("--- Room Created Successfully ---")
def showRooms():
q = "select * from rooms"
cr1 = con.cursor()
cr1.execute(q)
res = cr1.fetchall()
for row in res:
print(row)
def showVacantRooms():
q = "select * from rooms where
status='Vacant'"
cr1 = con.cursor()
cr1.execute(q)
res = cr1.fetchall()
for row in res:
print(row)
def showOccupiedRooms():
q = "select room_no, cname, phone from
rooms,booking where status='Occupied' and
romm_no = room_no"
cr1 = con.cursor()
cr1.execute(q)
res = cr1.fetchall()
for row in res:
print(row)
def bookRoom():
print("-" * 40)
print(" BOOKING A ROOM ")
print("-" * 40)
cname = input("Enter the Customer Name : ")
idtype = input("Enter the ID submitted(PAN
Card/License/Aadhar Card/Passport) : ")
idno = input("Enter the ID number : ")
address = input("Enter Address : ")
phone = input("Enter Phone number : ")
gender = input("Enter Gender : ")
dcheckin = input("Enter Date of Check in
(yyyy-mm-dd) : ")
room_no = int(input("Enter Room number : "))
q = "insert into
booking(cname,idno,idtype,address,phone,gende
r,dateofcheckin,room_no) values(%s,%s,%s,%s,
%s,%s,%s,%s)"
data =
(cname,idno,idtype,address,phone,gender,dchec
kin,room_no)
cr = con.cursor()
cr.execute(q,data)
con.commit()
q = "update rooms set status='Occupied'
where romm_no ="+ str(room_no)
cr.execute(q)
con.commit()
print("-" * 50)
print(" ROOM BOOKED")
print("-" * 50)
#Function to checkout a guest
def checkout():
room_no = input("Enter the Room Number : ")
q = "select room_no, cname, phone from
rooms,booking where status='Occupied' and
romm_no ="+ room_no
cr1 = con.cursor()
cr1.execute(q)
res = cr1.fetchall()
for row in res:
print(row)
chkoutdate = input("Enter the date of
Checkout : ")
q = "update rooms set status='Vacant' where
romm_no =" + str(room_no)
cr1.execute(q)
con.commit()
if con.is_connected():
showmenu()
BIBLIOGRAPHY

I have taken the help from the following sources to create this project:

● A TextBook of Python by Sumita Arora


● Online Access of code(Google Search)
● Mr. (HOD CSdeptt. -Project Instructor)
● www.w3schools.net
● www.w3resources.com
● http://en.wikipedia.org

You might also like