Paris Hotels Compan

Paris Hotels Compan

The Paris Hotels Company needs a computer program to track their hotel occupancy for the hotels in their chain. Write a Java program that calculates the occupancy rate for each floor of a hotel.

A hotel’s occupancy rate is calculated as follows:

Occupancy rate = number of rooms occupied / number of rooms

The program should start by asking for the number of floors int the hotel.
A loop should then iterate once for each floor. During each iteration the loop should ask the user for the number of rooms on the floor and the number of those rooms that are occupied.
The occupancy rate should be displayed for each floor.
After all the iterations, the program should display the number of rooms the hotel has, the number of those rooms that are occupied, the number that are vacant, and the occupancy rate for the hotel.

Input Validation: Do not accept a value less than one for the number of floors. Do not accept a number less than 10 for the number of rooms on a floor.


Name your program and submit it on the Moodle website.
Include comments defining the purpose of the code.
Include a comment giving your name.
Powered by