Oddp
Oddp
Submitted by
BACHELOR OF TECHNOLOGY
in
COMPUTER SCIENCE ENGINEERING
SCHOOL OF COMPUTING
1
SRM INSTITUTION OF SCIENCE AND TECHNOLOGY
KATTANKULATHUR-603203
BONAFIDE CERTIFICATE
Certified that this Project Report titled “Hotel Management System” is the bonafide work done by
supervision. Certified further, that to the best of my knowledge the work reported herein does not
SIGNATURE SIGNATURE
Dr. Sathyapriya Loganathan Dr. M Pushpalatha
OODP – Course Faculty Head of the Department
Department of OODP Department of OODP
SRMIST SRMIST
2
TABLE OF CONTENTS
4
1. Problem Statement
5
2. Modules of Project
3. Diagrams
9
a. Use case Diagram
9
b. Class Diagram
10
c. Sequence Diagram
10
d. Collaboration Diagram
11
e. State Chart Diagram
12
f. Activity Diagram
12
g. Package Diagram
13
h. Component Diagram
13
i. Deployment Diagram
14
4. Code/Output Screenshots
19
5. Conclusion and Results
20
6. References
3
Problem Statement
The records of Hotel ABC are all recorded via writing. This method has proven to be inefficient and
extremely time-consuming. Write a program that keeps track of all of the available stock the hotel
has, how much of the stock is used up, and how much the hotel has earned. Make sure that the
program is easy to understand and run by the hotel staff. Also, use C++ as the coding language of
this program.
4
Modules of Project
#include<iostream>
using namespace std;
int main()
{
int Qrooms=0,Qpasta=0,Qburger=0,Qnoodles=0,Qshake=0,Qchicken=0;
int Srooms=0,Spasta=0,Sburger=0,Snoodles=0,Sshake=0,Schicken=0;
int choice,q;
// system("cls");
cout<<"\n\t\t\tPlease select from the given menu options";
cout<<"\n\n 1) Rooms";
cout<<"\n 2) Pasta";
cout<<"\n 3) Burger";
cout<<"\n 4) Noodles";
cout<<"\n 5) Shake";
cout<<"\n 6) Chicken-roll";
cout<<"\n 7) Information regarding sales and collection";
cout<<"\n 8) Exit";
cout<<"\n\n Please enter Your Choice : ";
cin>>choice;
5
switch(choice)
{
case 1:
cout<<"\n\n Enter Number of rooms you want : ";
cin>>q;
if(Qrooms-Srooms >= q)
{
Srooms = Srooms + q;
Total_rooms =Total_rooms + (q*1200);
cout<<"\n\n\t\t"<<q<<" room/rooms have been alotted! ";
}
else
case 2:
cout<<"\n\n Enter Pasta Quantity : ";
cin>>q;
if(Qpasta-Spasta >= q)
{
Spasta =Spasta + q;
Total_pasta =Total_pasta + (q*250);
cout<<"\n\t"<<q<<" Pasta is the order";
}
else
cout<<"\n\n\t\tOnly "<<Qpasta-Spasta<<" Pastas Remaining in stock";
break;
case 3:
cout<<"\n\n Enter Burger Quantity : ";
cin>>q;
if(Qburger-Sburger >= q)
{
Sburger =Sburger + q;
Total_burger =Total_burger + q*50;
cout<<"\n\n\t\t"<<q<<" Burger is the order";
}
else
cout<<"\n\tOnly "<<Qburger-Sburger<<" Burgers Remaining in stock";
break;
case 4:
cout<<"\n\n Enter Noodles Quantity : ";
6
cin>>q;
if(Qnoodles-Snoodles >= q)
{
Snoodles =Snoodles + q;
Total_noodles =Total_noodles + (q*200);
cout<<"\n\n\t\t"<<q<<" Noodles is the order";
}
else
cout<<"\n\tOnly "<<Qnoodles-Snoodles<<" Noodles Remaining in stock";
break;
case 5:
cout<<"\n\n Enter Shakes Quantity : ";
cin>>q;
if(Qshake-Sshake >= q)
{
Sshake =Sshake + q;
Total_shake =Total_shake + q*170;
cout<<"\n\n\t\t"<<q<<" shakes is the order";
}
else
cout<<"\n\tOnly "<<Qshake-Sshake<<" shakes Remaining in stock";
break;
case 6:
cout<<"\n\n Enter Chicken-roll Quantity : ";
cin>>q;
if(Qchicken-Schicken >= q)
{
Schicken =Schicken + q;
Total_chicken =Total_chicken + q*160;
cout<<"\n\n\t\t"<<q<<" Chicken-rolls is the order";
}
else
cout<<"\n\tOnly "<<Qchicken-Schicken<<" Chicken-roll Remaining in
stock";
break;
case 7:
goto p;
}
8
Diagrams
Class Diagram
9
Sequence Diagram
Collaboration Diagram
10
State Chart Diagram
11
Activity Diagram
Package Diagram
12
Component Diagram
Deployment Diagram
13
Code Screenshots
14
15
16
Output Screenshots
17
18
Conclusion and Results
Hence, a successfully running and simple program was constructed for Hotel ABC by using C++ as
the platform. The program is able to keep track of available rooms and stock of foods and
beverages. It can also calculate how much the hotel has earned and when the hotel runs out of any
stock. The program is very simple and easy to use and understand by any of the hotel staff.
19
References
1. GeekforGeeks
2. Programiz
3. Object oriented Programming in C++ by Robert Lafore
20