Write a program that calculates the occupancy rate for hotel

Assignment Help C/C++ Programming
Reference no: EM131906371

Assignment

Write a program that calculates the occupancy rate for a hotel.

The program should meet the following requirements:

Displays a title, and welcome message to the user.

Ask the user how many floors the hotel has (do not accept an answer less than 1).

For each floor, ask the user to enter the total number of rooms.

For each floor, ask the user if any rooms are currently occupied (the amount occupied should never surpass the total number of rooms on that floor). Allow the user to respond with only 'Y' or 'N' (If the users anything other than these responses, display an error message and ask the user to respond accordingly. If the answer is 'Y', ask the user to enter the number of rooms that are currently occupied.

The program's final output should contain:

1) The total number of rooms on each floor.

2) The number of rooms currently occupied on each floor.

3) The number of rooms currently unoccupied on each floor.

4) The floor's occupancy rate (Number of rooms currently occupied divided by the total number of rooms)

A summary of the entire hotel that includes

1) The number of floors

2) The number of rooms occupied

3) The number of rooms unoccupied

4) The hotel's occupancy rate (Number of rooms currently occupied divided by the total number of rooms in the hotel)

The output should resemble the following:

*****************************

Hotel Occupancy Calculator

*****************************

Welcome to the Hotel Occupancy Calculator. Our system will allow you to enter information for your hotel and see the occupancy rates in detail.

Floor      Rooms  Available Occupied         Occupancy Rate

----------------------------------------------

Floor 1       20         5           15                  75

----------------------------------------------

Floor 2       12         5           7                   58.33

Hotel Summary

Number of Rooms: 32

Available Rooms: 10

Occupied Rooms: 22

Occupancy Rate: 68.75%.

Reference no: EM131906371

Questions Cloud

Larger electric resistance : Two wires with the same length but different cross sectional area. Which wire has a larger electric resistance?
What is the project equivalent annual cost or eac : If the required return is 16 percent, what is the project's equivalent annual cost, or EAC?
What is the angular frequency of the oscillations : If a 4.5 k? resistance is introduced into this circuit in series with the inductor and capacitor, what is the angular frequency of the (damped) oscillations?
Obtain a cross-section of what people think about diversity : To obtain a cross-section of what people think about diversity, conduct five-minute interviews with three individuals you don't know well.
Write a program that calculates the occupancy rate for hotel : Write a program that calculates the occupancy rate for a hotel. Ask the user how many floors the hotel has (do not accept an answer less than 1).
Find the de broglie wavelength of the electron : The radius of the electron's orbit in the Bohr model is 0.212 nm. Find the de Broglie wavelength of the electron under these circumstances.
Vector difference a-b : Vector B also has a magnitude of 8.00 units and is directed along the negative x-axis. Using graphical methods, find (a) the vector sum A+B and (b) the vector.
What are the NPVs of the two projects : what are the NPVs of the two projects? Why do IRR and NPV rank the two projects differently?
What aspect of each issue is problematic : Identify three major issues that you think you would need to work through in therapy. Explain what aspect of each issue is problematic for you.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd