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

OOP (Microproject)

The document describes a hotel management system project implemented in C++. It includes functions for adding rooms, searching for rooms, checking guests in and out, and generating a guest summary report. The code defines classes for rooms and customers and uses arrays to store and manage the room and customer data.

Uploaded by

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

OOP (Microproject)

The document describes a hotel management system project implemented in C++. It includes functions for adding rooms, searching for rooms, checking guests in and out, and generating a guest summary report. The code defines classes for rooms and customers and uses arrays to store and manage the room and customer data.

Uploaded by

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

Government Polytechnic, Pune-16

(An Autonomous Institute of Government of


Maharashtra)

Course: Relational Database Management System


Course Code: CM4111

Micro-Project Report on

“Online Hostel Management System”

Submitted by: -
Sr Name Enroll No
No
1 Mansi Siddhanti 2006113
2 Sakshi Sonawane 2006116
3 Vaishnavi Thakur 2006137

Under the Guidance of- Mrs. Saraswati


panchaksha

1
GOVERNMENT POLYTECHNIC PUNE
(An Autonomous Institute of Government of Maharashtra)

Department of Computer Engineering


ACADEMIC YEAR:2021-22

CERTIFICATE
This is to certify that the mini-project work entitled “MICRO PROJECT TITLE” is bona
-fide work carried out by
Mansi Siddhanti 2006113
Sakshi Sonawane 2006116
Aditi Yewate 2006137

of class Second Year in partial fulfillment of the requirement for the completion of the
course- Object-Oriented Programming: C++ (CM3104/CM388)-EVEN2020 of Diploma in
Computer Engineering from Government Polytechnic, Pune. The report has been approved
as it satisfies the academic requirements in respect of micro-project work prescribed for the
course.

……………………… …………………………
Mrs. Saraswati panchakshari Mr. Nikam Sir
Micro-Project Guide Head of the Department

……………...…………………………
Dr. Vitthal Bandal

Principal Government Polytechnic Pune

2
PROBLEM STATEMENT:-
To Study and Write a for the hostel management system.

PROBLEM DEFINITION:-
The hotel management system is designed to manage all hotel
activities like hostel menu, customers, room, staff allotment, and hotel
stores & generates related reports for smooth transactions. It is also
used to manage monthly mess bill calculation, hostel staff payroll,
student certificates, etc.
The aim of the Hotel Management System is to carry out the
activities of the Hotel in an efficient way. It will take the operations of
the Hotel to an upper level by providing faster access to data and
allowing addition, up-gradation, modification, and deletion of data in
a very systematic and reliable manner.

HARDWARE SPECIFICATION:-
Device: Lenovo i3

Processor: intel core i3

RAM: 8 GB

Operating system: Windows 10

PLATFORM:
Turbo c++
Microsoft Word

3
ACKNOWLEDGEMENT

This amongst a wide panorama of people who provided me inspiring guidance and
encouragement, I take opportunity to thanks those who gave indebted assistance for
completing project.
I humbly wish to extend my cordial gratitude with profound thanks to my project guide for
his/her meticulous planning, valuable guidance, constant encouragement, and the invaluable
time he spent with me discussing each aspect of my project.
My heartfelt thanks for my dearest and loving parents for all their love, care and affection.
I’m thankful to them for standing by me like a strong pillar in failures and success.

4
Index

Contents

Sr. No. Content Page No.

01. Abstract 6

02. Introduction 7

03. Program Code 9

04. Results 21

05. Outcomes Achieved 25

06. conclusion 25

07 Referces 26

5
ABSTRACT

The system aims the maintenance and management of the different


Hotels that are available in the different parts of the world. It mainly takes care of
the Hotel management at the core area of the database. The system provides
information regarding the different Hotels that are available and their status
specific to availability. The guests can visit the site and register
themselves with the required information that is expected by the system. Each
registered guest can raise a request for the unit bookings. The Guests are scheduled
with the information of the availability of the units for they have requested the
time.
In this project on “Hotel Management System”, we have tried to show
how data in the hotel is managed. This is just an overview of management in
hotels. This has been achieved by dividing the project into various modules.in this
project customer is provided with different services like checking in, checking out,
booking a room, or can be advance payments, etc. Inquiry of room is also
available in this project. We have included only a few modules, as our purpose is
to only have the idea or to study how the management is done in hotels. By having
many more modules this type of project can have scope in various hotels.

6
INTRODUCTION
C++, as we all know is an extension of C language and was developed by Bjarne
Stroustrup at bell labs. C++ is an intermediate-level language, as it comprises a confirmation
of both high-level and low-level language features. C++ is a statically typed, free form,
multiparadigm, compiled general-purpose language.

A hotel management system is a software system where the management of the entire hotel is
computerized. In this project the details are maintained like customer details, reservation
details, room availability, etc. this project can be viewed completely and the head of the
management can daily and, monthly review it. This project includes features like

1. Creating Rooms for customers


2. Booking a Room
3. Checking Availability of Rooms in the hotel
4. Searching for Customer and customers details
5. Check-Out Room
6. Guest summary report

7
It covers macros, classes, objects, arrays, functions, loops, and
structure in this project for C++ novices. When this code is launched,
the user is presented with a menu with seven options numbered 1
through 7, after which the program executes according to the user's
choices. The output from the g++ compiler may be seen at the bottom
of this page.

The following are the project's main features:


 Manage rooms: In this project we can manage how much
rooms available or booked .
 Guest Check-In & Check-Out: Using this project we can
monitor the guest check-in or check-Out activities with time.
 Get available rooms: We can get all available rooms.

 Search customer: Using this we can search any customer


or guest, is he/she still available in hotel or not.
 Get guest summary report: We will get the summary
details of guest using this project.

8
Program code
#include<iostream.h>
#include<string.h>
#include<conio.h>
#include<process.h>
#define max 100
//Class Customer
class Customer
{
public:
char name[100];
char address[100];
char phone[12];
charfrom_date[20];
charto_date[20];
floatpayment_advance;
intbooking_id;
};
class Room
{
public:
char type;
charstype;
char ac;
introomNumber;
int rent;
int status;
class Customer cust;
class Room addRoom(int);
voidsearchRoom(int);

9
voiddeleteRoom(int);
voiddisplayRoom(Room);
};
//Global Declarations
class Room rooms[max];
int count=0;
Room Room::addRoom(intrno)
{
class Room room;
room.roomNumber=rno; cout<<"\
nType AC/Non-AC (A/N) : ";
cin>>room.ac;
cout<<"\nType Comfort (S/N) : ";
cin>>room.type;
cout<<"\nType Size (B/S) : ";
cin>>room.stype; cout<<"\
nDaily Rent : ";
cin>>room.rent;
room.status=0;
cout<<"\n Room Added Successfully!";
getch();
return room;
}
void Room::searchRoom(intrno)
{
inti,found=0;
for(i=0;i<count;i++)
{
if(rooms[i].roomNumber==rno)
{
found=1;
break;

10
}
}
if(found==1)
{
cout<<"Room Details\n";
if(rooms[i].status==1)
{
cout<<"\nRoom is Reserved";
}
else
{
cout<<"\nRoom is available";
}
displayRoom(rooms[i]);
getch();
}
else
{
cout<<"\nRoom not found";
getch();
}
}
void Room::displayRoom(Room tempRoom)
{
cout<<"\n \n";
cout<<"\nRoom Number: \t"<<tempRoom.roomNumber;
cout<<"\nType AC/Non-AC (A/N) "<<tempRoom.ac;
cout<<"\nType Comfort (S/N) "<<tempRoom.type;
cout<<"\nType Size (B/S) "<<tempRoom.stype;
cout<<"\nRent: "<<tempRoom.rent;
}
//hotel management class

11
classHotelMgnt:protected Room
{
public:
voidcheckIn();
voidgetAvailRoom();
voidsearchCustomer(char *);
voidcheckOut(int);
voidguestSummaryReport();
};
voidHotelMgnt::guestSummaryReport(){
if(count==0){
cout<<"\n No Guest in Hotel !!";
}
for(int i=0;i<count;i++)
{
if(rooms[i].status==1)
{
cout<<"\n \n";
cout<<"\n Customer First Name : "<<rooms[i].cust.name;
cout<<"\n Room Number : "<<rooms[i].roomNumber;
cout<<"\n Address (only city) : "<<rooms[i].cust.address;
cout<<"\n Phone : "<<rooms[i].cust.phone;
cout<<"\n \n";
}
}
getch();
}
//hotel management reservation of room
voidHotelMgnt::checkIn()
{
inti,found=0,rno;
class Room room;

12
cout<<"\nEnter Room number : ";
cin>>rno;
for(i=0;i<count;i++)
{
if(rooms[i].roomNumber==rno)
{
found=1;
break;
}
}
if(found==1)
{
if(rooms[i].status==1)
{
cout<<"\nRoom is already Booked";
getch();
return;
}
cout<<"\nEnter booking id: ";
cin>>rooms[i].cust.booking_id;
cout<<"\nEnter Customer Name (First Name): ";
cin>>rooms[i].cust.name;
cout<<"\nEnter Address (only city): ";
cin>>rooms[i].cust.address; cout<<"\
nEnter Phone: ";
cin>>rooms[i].cust.phone; cout<<"\
nEnter From Date: ";
cin>>rooms[i].cust.from_date;
cout<<"\nEnter to Date: ";
cin>>rooms[i].cust.to_date; cout<<"\
nEnter Advance Payment: ";
cin>>rooms[i].cust.payment_advance;

13
rooms[i].status=1;
cout<<"\n Customer Checked-in Successfully..";
getch();
}
}
//hotel management shows available rooms
voidHotelMgnt::getAvailRoom()
{
inti,found=0;
for(i=0;i<count;i++)
{
if(rooms[i].status==0)
{
displayRoom(rooms[i]); cout<<"\n\
nPress enter for next room"; found=1;
getch();
}
}
if(found==0)
{
cout<<"\nAll rooms are reserved";
getch();
}
}
//hotel management shows all persons that have booked room
voidHotelMgnt::searchCustomer(char *pname)
{
inti,found=0;
for(i=0;i<count;i++)
{
if(rooms[i].status==1 &&stricmp(rooms[i].cust.name,pname)==0)

14
{
cout<<"\nCustomer Name: "<<rooms[i].cust.name;
cout<<"\nRoomNumber: "<<rooms[i].roomNumber;
cout<<"\n\nPress enter for next record";
found=1;
getch();
}
}
if(found==0)
{
cout<<"\nPerson not found.";
getch();
}
}
//hotel managemt generates the bill of the expenses
voidHotelMgnt::checkOut(introomNum)
{
inti,found=0,days,rno;
floatbillAmount=0;
for(i=0;i<count;i++)
{
if(rooms[i].status==1 && rooms[i].roomNumber==roomNum)
{
//rno = rooms[i].roomNumber;
found=1;
//getch();
break;
}
}
if(found==1)
{
cout<<"\nEnter Number of Days:\t";

15
cin>>days;
billAmount=days * rooms[i].rent;
cout<<"\n \n";
cout<<"\n\\t\t\t######## CheckOut Details ########\n"; cout<<"\
nCustomer Name : "<<rooms[i].cust.name;
cout<<"\nRoom Number : "<<rooms[i].roomNumber;
cout<<"\nAddress : "<<rooms[i].cust.address;
cout<<"\nPhone : "<<rooms[i].cust.phone; cout<<"\
nTotal Amount Due : "<<billAmount<<" /";
cout<<"\nAdvance Paid: "<<rooms[i].cust.payment_advance<<" /";
cout<<"\n*** Total Payable: "<<billAmount-rooms[i].cust.payment_advance<<"/ only";
rooms[i].status=0;
}
getch();
}
//managing rooms (adding and searching available rooms)
voidmanageRooms()
{
class Room room;
intopt,rno,i,flag=0;
charch;
do
{
//system("cls");
cout<<"\n\t\t\----- ### Manage Rooms ###-----\n";
cout<<"\n1. Add Room";
cout<<"\n2. Search Room";
cout<<"\n3. Back to main menu ";
cout<<"\n \n";
cout<<"\n\nEnter Option: ";
cin>>opt;
//switch statement

16
switch(opt)
{
case 1:
cout<<"\nEnter Room Number: ";
cin>>rno;
i=0;
for(i=0;i<count;i++)
{
if(rooms[i].roomNumber==rno)
{
flag=1;
}
}
if(flag==1)
{
cout<<"\nRoom Number is Present.\nPlease enter unique Number";
flag=0;
getch();
}
else
{
rooms[count]=room.addRoom(rno);
count++;
}
break;
case 2:
cout<<"\nEnter room number: ";
cin>>rno;
room.searchRoom(rno);
break;
case 3:
break;

17
default:
cout<<"\nPlease Enter correct option";
break;
}
}while(opt!=3);
}
void main()
{
classHotelMgnthm;
inti,j,opt,rno;
charch;
charpname[100];
do
{
clrscr();
cout<<"\n \n";
cout<<"\n\n\t\t ********* Hotel Management **********\n";
cout<<"\n \n";
cout<<"\n1. Manage Rooms";
cout<<"\n2. Book a Room";
cout<<"\n3. Available Rooms";
cout<<"\n4. Search Customer";
cout<<"\n5. Check-Out Room";
cout<<"\n6. Guest summary report";
cout<<"\n7. Exit";
cout<<"\n
_\n";
cout<<"\n\nEnter Option: ";
cin>>opt;
switch(opt)
{
case 1:

18
manageRooms();
break;
case 2:
if(count==0)
{
cout<<"\nRooms data is not available.\nPlease add the rooms first.";
getch();
}
else
hm.checkIn();
break;
case 3:
if(count==0)
{
cout<<"\nRooms data is not available.\nPlease add the rooms first.";
getch();
}
else
hm.getAvailRoom();
break;
case 4:
if(count==0)
{
cout<<"\nRooms are not available.\nPlease add the rooms first.";
getch();
}
else
{
cout<<"Enter Customer Name: ";
cin>>pname;
hm.searchCustomer(pname);
}

19
break;
case 5:
if(count==0)
{
cout<<"\nRooms are not available.\nPlease add the rooms first.";
getch();
}
else
{
cout<<"Enter Room Number : ";
cin>>rno;
hm.checkOut(rno);
}
break;
case 6:
hm.guestSummaryReport();
break;
case 7:
cout<<"\nTHANK YOU! FOR USING SOFTWARE";
cout<<"\n Press Enter key to exit application";
break;
default:
cout<<"\nPlease Enter correct option";
break;
}
}while(opt!=7);
getch();
}

20
RESULTS:

21
22
23
24
OUTCOMES ACHIEVED

• We got to learn various concepts related to Object-oriented


Programming in C++.
• Improvement in Programming skills as well as presentation
skills.
• We learned to handle hardware as well as software
components efficiently.
• Learnt to implement c++ language easily and effectively
using various concepts of object-oriented programming.
• During this time, we learned to help each other to solve the
problems.
• While working on this project, we realized that to do any
group task trusting each other is very important.

Conclusion: -
In this micro project, we successfully designed a
Hotel Management System with the help of various
mathematical functions using c++ language. We tried to
build a user-friendly Hotel management system that
anyone can easily use. This particular project deals with the
problems of managing a hostel and avoids the problems which
occur when carried out manually.

25
References: -
Book Object-oriented programming with C++

Website https://www.geeksforgeeks.org/hotel-management-system/

Link https://www.cppbuzz.com/projects/c++/c++-project-on-hotel-
management

Application YouTube, Google

26

You might also like