0% found this document useful (0 votes)
9 views20 pages

Sample C.S project

The document presents a project on a Hotel Management System developed by Arnav D as part of the Computer Science curriculum for CBSE Board 2024-2025. It includes a certificate of authenticity, acknowledgments, an index, and detailed descriptions of the project's functionalities, including customer check-in/check-out, room booking, and database management using SQL. The project aims to improve hotel management efficiency and addresses existing software limitations encountered during research at various hotels.

Uploaded by

poochu120309
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views20 pages

Sample C.S project

The document presents a project on a Hotel Management System developed by Arnav D as part of the Computer Science curriculum for CBSE Board 2024-2025. It includes a certificate of authenticity, acknowledgments, an index, and detailed descriptions of the project's functionalities, including customer check-in/check-out, room booking, and database management using SQL. The project aims to improve hotel management efficiency and addresses existing software limitations encountered during research at various hotels.

Uploaded by

poochu120309
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

EVERWIN VIDHYASHRAM

SENIOR SECONDARY SCHOOL


COMPUTER SCIENCE PROJECT
TOPIC:-HOTEL MANAGEMENT SYSTEM

NAME : ARNAV.D

STANDARD : XII

SECTION : ARDENT

1|P a g e
CERTIFICATE
This is to certify that the project entitled
“HOTEL MANAGEMENT SYSTEM” Is a record
of bonafide work carries out by “ARNAV.D” of
XII-ARDENT. In partial Fulfilment of the
requirements in COMPUTER SCIENCE
prescribed by CBSE for CBSE BOARD 2024 –
2025 in school EVERWIN VIDHYASHRAM
SENIOR SEC.SCHOOL, Kolathur, Chennai-
600099.

DATE: PRINCIPAL

INTERNAL EXTERNAL

2|P a g e
ACKNOWLEDGEMENT
We wish to express our sincere thanks to Ms.
Vidhya Hari, Principal of EVERWIN
VIDHYASHRAM SENIOR SEC.SCHOOL,
Kolathur , Chennai for guiding us to cause the
successful outcome of this project work.
We wish to express our deep & profound sense
of gratitude to our guide/teacher SUMALATHA.S
(Comp. Sc), for her expert help & valuable
guidance, comments and suggestions. We also place
on record, our sincere gratitude to one and all who,
directly or indirectly have lent their helping hand in
this venture.

3|P a g e
INDEX
S.NO CONTENT PAGE
1. INTRODUCTION TO PROJECT 5
2. CODING 6
3. OUTPUTS 16
4. BIBLIOGRAPHY 21

4|P a g e
INTRODUCTION
My project on “HOTEL MANAGEMENT” gives idea about the management
in hotels. The package gives all the
information regarding the check in
or check out facilities of customer.
The customer can make his or her
booking for rooms and food etc. It
gives details of the customer and the
time of arrival and departure of
customer. The package also provides
the facility of searching the customer
or employee working in that
particular hotel by name by provided
Id. It gives a detailed report of the
customer and the room occupied by him/her. This software is very useful to the
departments for managing their activities. Although, hotels are already having
well-developed software for information management. We just want to study how
this is done. So, I selected hotel management system as my project. I visited
various hotels and gone through their software. In most of the hotel the back-end
used only MSACCESS. But I included SQL in my since it is pure relational
database. In one of hotel, I found that they have problem that software does not
show the room vacant as soon as it being vacant. The status of room is updated
only after 12 hours or 24 hours depending upon the time period the have taken.
They were facing problem in providing and at any moment of time the status of
room that whether it is vacant or occupied is shown correctly.

5|P a g e
CODING
Creating Database and Table
import mysql.connector

db=mysql.connector.connect(host='localhost',user='root',password='deepak')

mycursor=db.cursor()

mycursor.execute('create database if not exists HOTEL_MANAGEMENT')

db=mysql.connector.connect(host='localhost',user='root',password='deepak',database=
'HOTEL_MANAGEMENT')

mycursor=db.cursor()

mycursor.execute("create table if not exists hoteldata(Ccode int(5) primary key,Cname\ varchar(20),Cadd


varchar(20),Cindate varchar(5),Coutdate varchar(5),Room_no varchar(5),\ Room_rent varchar(10),Food_bill
varchar(10) default '00',Laudry_bill varchar(10) default\ '00',Game_bill varchar(10) default '00',SubTotal_bill
varchar(10),Add_charges varchar(10)\ default '1800',GrandTotal_bill varchar(10))") :

mycursor.execute("insert into hoteldata values(25,'Deepak','Morar,Gwalior',25,26,\ 1000,


6000,150,10,180,6340,1800,8140)")

mycursor.execute("insert into hoteldata values(26,'Amit','Morar,Gwalior',5,8,1017,\


10000,5,0,50,10155,1800,11955)")

mycursor.execute("insert into hoteldata values(27,'Anuj','New Delhi',12,20,1407,\


000,130,7,80,4217,1800,6017)")

mycursor.execute("insert into hoteldata values(28,'Kunal','Morar,Gwalior',5,8,1405,\


9000,20,0,90,9110,1800,10910)")

mycursor.execute("insert into hoteldata values(29,'Smith','Canada',23,30,1008,\


3000,20,5,50,30075,1800,31875)")

mycursor.execute("insert into hoteldata values(30,'Alex','America',25,30,1012,\


3000,30,6,0,30036,1800,31836)")

mycursor.execute("create table if not exists Room(Rooms varchar(10),Type varchar(45),\ Charges


int(7),Features varchar(90),Occupancy int(45))") :

6|P a g e
mycursor.execute("insert into Room values('1-500','Duplex',6000,'Two rooms on\ same floor connected by
common stairs',5)")

mycursor.execute("insert into Room values('501-1000','Cabana',5000,'Faces water\ body,beach or a


swimming pool',3)")

mycursor.execute("insert into Room values('1001-1500','Lanai',4000,'This room faces\ a landscape, a


waterfall, or a garden',4)")

mycursor.execute("insert into Room values('1501-2000','Suit',3000, 'It is composed of\ one or more


bedrooms, a living room, and a dining area',12)")

mycursor.execute("create table if not exists Customer(Ccode int(5),Cid_type varchar\ (20),Cid_no


varchar(15) primary key , Cname varchar(15), Ccontact_no varchar(15),Cadd\ varchar(20),Cindate varchar(5),
Coutdate varchar(5), CNationality varchar(10))")

mycursor.execute("insert into Customer values(25,'Aadhaar card' ,412563578952, 'Deepak' ,8269513294,


'Morar,Gwalior' ,25,26,'Indian' )")

mycursor.execute("insert into Customer values(26,'Pan card', 5874695325,'Amit',\


9063560847,'Morar,Gwalior',5,8,'Indian')")

mycursor.execute("insert into Customer values(27,'Pan card', 8456958236, 'Anuj',\ 9770563593,'New


Delhi',12,20,'Indian')")

mycursor.execute("insert into Customer values(28,'Service Id',8546952156,'Kunal',\


4856985123,'Morar,Gwalior',5,8,'Indian')")

mycursor.execute("insert into Customer values(29,'Voter Id Card',45896244,'Smith',\


6598541256,'Canada',23,30,'Canadian')")

mycursor.execute("insert into Customer values(30,'Aadhaar card',485962578545,\


'Alex',6325489652,'America',25,30,'American')")

db.commit()

def speciality():

db=mysql.connector.connect(host='localhost',user='root',password='deepak',database=
‘HOTEL_MANAGEMENT')

mycursor=db.cursor()

qry=("select * from room")

7|P a g e
mycursor.execute(qry)

print("\nDESCRIPTION:")

print("The Taj Mahal Palace, Mumbai makes a wonderful starting point from which to\ discover the
charms that bring people from around the globe flocking to Mumbai city,\ India’s commercial and
entertainment capital. Around the corner from the hotel is Colaba\ Causeway - a vibrant stretch filled with
roadside stores, jewellery shops, pubs and\ restaurants that whisks guests back in time to old Bombay. Take a
tour of and learn about\ the rich history and architecture of this vibrant city, accompanied by Government of
India\ appointed and trained tourism officials.Walk past Gothic buildings and through narrow\ streets.Visit
historic locations such as Wellington Fountain, Regal Cinema, Indian Merchant\ Building, Asiatic Library, CSMVS
Museum, Jehangir Art Gallery, Elphinstone College and\ other prominent buildings in varying styles of
architecture, each symbolic of a particular\ period of Bombay’s social and commercial history.\n")

for (Rooms,Type,Charges,Features,Occupancy) in mycursor:

print("We have Rooms",Rooms,"of type",Type,",it has",Features,"and occupancy\


of",Occupancy,"persons.")

db.commit()

print("SERVICES:")

print("For the disabled, Breakfast, Restaurant, Adsl wi-fi internet, Fax, Newspapers,\ Transfer, Tourist
information, Small animals welcome, Private parking,Guarded garage,\ 24h reception, 24h bar, Beaches at 500
m, Shuttle bus stop for the airport only 10 minutes\ away.\n")

print("FACILITIES:")

print("ReceptionHall, Bar, Pool 10.00 a.m. – 6.00 p.m.\n")

print("BOOKING:")

print("Excursions, Guided tours, Private parties")

mycursor.close()

db.close()

8|P a g e
mycursor=db.cursor()

Ccode=input("\nEnter Customer Code to be Searched in Hotel:")

qry=("select * from hoteldata where Ccode=%s")

rec_srch=(Ccode,)

mycursor.execute(qry,rec_srch)

rec_count=0 for(Ccode,Cname,Cadd,Cindate,Coutdate,Room_no,Room_rent,Food_bill,Laudry_bill,
Game_bill,SubTotal_bill,Add_charges,GrandTotal_bill) in mycursor: rec_count+=1

print ('\nRecord Found')

print ("Customer details ..... ")

print ("Customer code:",Ccode)

print ("Customer name:",Cname)

print ("Customer address:",Cadd)

print ("Check in date:",Cindate)

print ("Check out date",Coutdate)

print ("Room number:",Room_no)

print ("Room rent is:",Room_rent)

print ("Food bill is:",Food_bill)

print ("Laundary bill is:",Laudry_bill)

print ("Game bill is:",Game_bill)

print ("Sub total bill is:",SubTotal_bill)

print ("Additional Service Charges is:",Add_charges)

print ("Grand Total bill is:",GrandTotal_bill)

if (rec_count==0):

print("\nRecord not found!!")

db.commit()

9|P a g e
mycursor.close()

db.close()

Update Customer
def update():

print("\nWhich Data Should be Updated ......")

print("1.Customer Name:")

print("2.Customer Address")

print("3.Customer out Date")

print("4.Customer Room Number")

print("5.Customer Contact number")

c=int(input("\nSelect your Choice:"))

if (c==1):

db=mysql.connector.connect(host='localhost',user='root',password=

'deepak', database='HOTEL_MANAGEMENT')

mycursor=db.cursor()

Ccode=input('\nEnter Code of Customer to be Updated:')

qry=('select * from hoteldata where Ccode=%s')

Cname=input("Enter Customer Name:")

q=('update hoteldata set Cname=%s where Ccode=%s')

data=(Cname,Ccode)

mycursor.execute(q,data)

q=('update customer set Cname=%s where Ccode=%s')

data=(Cname,Ccode)

mycursor.execute(q,data)

10 | P a g e
print('\nRecord Updated .... ')

db.commit()

mycursor.close()

db.close()

elif (c==2):

db=mysql.connector.connect(host='localhost',user='root',password=

'deepak' database='HOTEL_MANAGEMENT')

mycursor=db.cursor()

Ccode=int(input('\nEnter Code of Customer to be Updated:'))

qry=('select * from hoteldata where Ccode=%s')

Cadd=input("Enter Customer Adrress:")

q=('update hoteldata set Cadd=%s where Ccode=%s')

data=(Cadd,Ccode)

mycursor.execute(q,data)

q=('update customer set Cadd=%s where Ccode=%s')

data=(Cadd,Ccode)

mycursor.execute(q,data)

print('\nRecord Updated .... ')

db.commit()

mycursor.close()

db.close()

elif (c==3):

db=mysql.connector.connect(host='localhost',user='root',password=

'deepak', database='HOTEL_MANAGEMENT')

mycursor=db.cursor()

11 | P a g e
Ccode=int(input('\nEnter Code of Customer to be Updated:'))

qry=('select * from hoteldata where Ccode=%s')

Cindate=input("Enter Customer in Date:")

q=('update hoteldata set Cindate=%s where Ccode=%s')

data=(Cindate,Ccode)

mycursor.execute(q,data)

q=('update customer set Cindate=%s where Ccode=%s')

data=(Cindate,Ccode)

mycursor.execute(q,data)

print('\nRecord Updated .... ')

db.commit()

mycursor.close()

db.close()

elif (c==4):

db=mysql.connector.connect(host='localhost',user='root',password=

'deepak', database='HOTEL_MANAGEMENT')

mycursor=db.cursor()

Ccode=int(input('\nEnter Code of Customer to be Updated:'))

qry=('select * from hoteldata where Ccode=%s')

Coutdate=input("Enter Customer out Date:")

q=('update hoteldata set Coutdate=%s where Ccode=%s')

data=(Coutdate,Ccode)

mycursor.execute(q,data)

q=('update customer set Coutdate=%s where Ccode=%s')

data=(Coutdate,Ccode)

12 | P a g e
mycursor.execute(q,data)

print('\nRecord Updated .... ')

db.commit()

mycursor.close()

db.close()

elif (c==5):

db=mysql.connector.connect(host='localhost',user='root',password=

'deepak', database='HOTEL_MANAGEMENT')

mycursor=db.cursor()

Ccode=int(input('\nEnter Code of Customer to be Updated:'))

qry=('select * from customer where Ccode=%s')

Ccontact_no=input("Enter Customer Contact number:")

q=('update customer set Ccontact_no=%s where Ccode=%s')

data=(Ccontact_no,Ccode)

mycursor.execute(q,data)

print('\nRecord Updated .... ')

db.commit()

mycursor.close()

db.close()

else :

print("Invalid Input!!")

print("\n\t\t\t\t\t\t\t\t ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░")
print("֎֎ ֎֎֎֎֎ ֎֎֎ ֎ ֎֎֎֎ ֎ ֎֎֎ ֎
֎֎֎
֎֎֎֎֎
֎֎֎
֎֎\֎
֎֎֎֎
֎֎֎
֎֎░░ WELCOME TO THE

TAJ PALACE ░░֎


֎֎֎
֎֎֎
֎֎\ ֎֎
֎֎֎
֎֎֎
֎֎֎
֎֎֎
֎֎֎
֎֎֎
֎֎֎֎֎
֎֎֎
֎֎֎
֎֎֎") print("\t\t\t\t\t\t\t\t
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░")

13 | P a g e
while True:

print("\n") print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")

print("1.Speciality of your Hotel")

print("2.Customer Management")

print("3.Booking for Private Party")

print("4.EXIT") print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")

b=input("\nEnter your choice:")

if (b=='1'):

speciality()

elif (b=='2'):

hotelfarecal()

elif (b=='3'):

party()

elif (b=='4'):

quit()

else:

print("Wrong Choice")

14 | P a g e
OUTPUTS

➢ Main screen of Hotel Management

➢ Customer Mangement

15 | P a g e
➢ Inserting data of customer

16 | P a g e
➢ Displaying customers in Hotel

17 | P a g e
➢ Displaying customer by its code

➢ Update customer record

18 | P a g e
➢ Updating cutomer’s name by its code

19 | P a g e
BIBLIOGRAPHY
• python.org

• Code Academy

• tutorialsPoint.com

• PythonChallenge.com

• Google’s Python Class

• LearnPython.org

20 | P a g e

You might also like