0% found this document useful (0 votes)
70 views15 pages

Hotel Management System

The document describes a Hotel Management System created using C++. It includes classes like Hotel and Second to store guest information and room details. Methods like accept() are used to take user input while display() shows the stored data. A menu drives the program, allowing the user to book, cancel or edit rooms. Object oriented concepts like inheritance and polymorphism are applied. The system aims to efficiently manage all hotel operations and customer records.

Uploaded by

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

Hotel Management System

The document describes a Hotel Management System created using C++. It includes classes like Hotel and Second to store guest information and room details. Methods like accept() are used to take user input while display() shows the stored data. A menu drives the program, allowing the user to book, cancel or edit rooms. Object oriented concepts like inheritance and polymorphism are applied. The system aims to efficiently manage all hotel operations and customer records.

Uploaded by

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

HOTEL MANAGEMENT

SYSTEM
INTRODUCTION

• The prime purpose of C++ programming was to add object orientation to the C programming
language, which is in itself one of the most powerful programming languages.
• The core of the pure object-oriented programming is to create an object, in code, that has certain
properties and methods.
• While designing C++ modules, we try to see whole world in the form of objects.
• Object Oriented programming is a programming style that is associated with the concept of
Class, Objects and various other concepts revolving around these two, like Inheritance,
Polymorphism, Abstraction, Encapsulation etc.
THERE ARE A FEW PRINCIPLE CONCEPTS THAT FORM THE FOUNDATION OF OBJECT
ORIENTED PROGRAMMING −
 

• Object: This is the basic unit of object oriented programming. That is both data and function that
operate on data are bundled as a unit called as object.

•  Class: When you define a class, you define a blueprint for an object. This doesn't actually define
any data, but it does define what the class name means, that is, what an object of the class
will consist of and what operations can be performed on such an object.

•  Abstraction: Data abstraction refers to, providing only essential information to the outside world
and hiding their background details

•  Encapsulation: Encapsulation is placing the data and the functions that work on that data in the
same place.
•  Inheritance: One of the most useful aspects of object-oriented programming is code reusability. As
the name suggests Inheritance is the process of forming a new class from an existing class that is
from the existing class called as base class, new class is formed called as derived class. 

•  Polymorphism: The ability to use an operator or function in different ways in other words giving
different meaning or functions to the operators or functions is called polymorphism. Poly refers to
many. That is a single function or an operator functioning in many ways different upon the usage is
called polymorphism.

•  Overloading: The concept of overloading is also a branch of polymorphism. When the exiting
operator or function is made to operate on new data type, it is said to be overloaded
SOURCE CODE

• #include<iostream.h> • {
• #include<conio.h>
• cout<<"\n Enter your Name:";
• #include<string.h>
• cin>>name;
• #include<stdio.h>
• cout<<"\n Enter Your Mobile Number:";
• #include<process.h>

•  class hotel • cin>>mobile;

• { • cout<<"\n Enter your Gender(M/F)";


• public:
• cin>>gen;
• int mobile,rno;
• cout<<"\n Enter a Type Of Room:";
• char name[10],gen;
• cin>>bs;
• char bs[10],ds[10];

• Vois accept() • cout<<"\n Enter Room Price To Have:";

• cin>>ds;
• void display() • void accept1()

• { • {

• cout<<"\n Name="<<name; • cout<<"\n Ac Rooms";

• cout<<"\n mobile="<<mobile; • cout<<"\n from 1-31";

• cout<<"\n Gender="<<gen; • cout<<"\n Starting from Rooms 10000rs";

• cout<<"\n Type of Room="<<bs; • cout<<"\n*****************************";

• cout<<"\n Room Price To Have="<<ds; • cout<<"\n Non-Ac Rooms";

• } • cout<<"\n from 32-45";

• }; • cout<<"\n Starting from Rooms 5000rs";

•   • cout<<"\n******************************";

• class second:public hotel • cout<<"\n Luxury Rooms";

• { • cout<<"\n from 46-60";

• public:
• cout<<"\n Starting from Rooms 20000rs"; • void main()

• cout<<"\n******************************"; • {

• cout<<"\n Ordinary Rooms"; • second s;

• cout<<"\n from 61-75"; • int ch,a[10],n,i,b,flag=0,acc,c,p;

• cout<<"\n Starting from Rooms 2000rs"; • char ch1,ch2,ch3;

• cout<<"\n******************************"; • do

• cout<<"\n regular rooms"; • {

• cout<<"\n from 76-100"; • clrscr();

• cout<<"\n Starting from Rooms 1000rs"; • cout<<"\n \n \t \t \t Taj Hotel";

• cout<<"\n******************************"; • cout<<"\n Main Menu:";

• } • cout<<"\n 1.Room Details";

• }; • cout<<"\n 2.Booking A Room.";


• cout<<"\n 3.Edit Records."; • case 2:

• cout<<"\n 4.Room Canceling."; • cout<<"\n \t \t \t Booking a Room: ";

• cout<<"\n 5.Exit."; • cout<<"\n \t Enter Number of Rooms To Reserve:";

• cout<<"\n Enter your Choice"; • cin>>n;

• cin>>ch; • s.rno=1;

•   • for(i=0;i<n;i++)

• switch(ch) • s.accept();

• { • s.display();

• case 1: • cout<<"\n \t \t ---Your Room is Booked---";

• cout<<"\n \t \t\t ---Room Details---"; •  

• s.accept1(); • cout<<"\n Room No is:"<<s.rno;

• break; • s.rno++;

• {
• p=s.rno; • if(s.rno==c)

• if(s.mobile<=10||s.mobile>=60) • {

• cout<<"\n \t \t ---Your Room is Booked---"; • flag=1;

• } • }

• break; • else

• case 3: • {

• cout<<"\n \t \t \t Change your Rooms details:"; • flag=0;

• cout<<"\n Enter Your Room Number"; • s.rno--;

• cin>>c; • }

• s.rno--; • }

• for(i=0;i<n;i++) • if(flag==1)

• { • {
• s.accept(); • cout<<"\n Enter Your Room Number";

• cout<<"\n \t \t \t Your Room Information Has been Changed."; • cin>>b;

• s.display(); • p--;

• } • for(i=0;i<n;i++)

• else • {

• { • if(p==b)

• cout<<"\n **Wrong Room Number**"; • {

• s.rno--; • flag=1;

• } • }

• break; • else

• case 4: • {

• cout<<"\n \t \t \t Room cancel: "; • flag=0;


• p--; • cout<<"\n **Wrong Room Number**";

• } • p--;

• } • }

• if(flag==1) • break;

• { • case 5:

• cout<<"\n Your Room is Cancel."; • exit(0);

• cout<<"\n Enter Your Bank Account Number:"; • }

• cin>>acc; • cout<<"\n Do you want to enter another Choice(y/n)";

• cout<<"\n --your Payment Transfer directly in your bank • ch3=getche();


account.--";
• }while(ch3=='y');
• }
• getch();
• else
• }
• {
OUTPUT
CONCLUSION

• In this project, we have covered how to build Hotel Management System Project and manage
information of rooms, guests etc.. using C++ programming language.

• This hotel management has been developed to meet all the processing requirements which are
needed within the hotel industry. This system will allow the hotel reception department to manage
all the records of their customers and their payment in easy manner.

You might also like