Question: Java Program, Thank you. Hotel occupancy: a hotel's occupancy rate is calculated as follows: occupancy rate = number of rooms occupied / total number of

Java Program, Thank you.
Hotel occupancy: a hotel's occupancy rate is calculated as follows: occupancy rate = number of rooms occupied / total number of rooms Write a program that calculates and display the occupancy rate for each floor and the entire hotel. The program should start by asking for the number of floors in the hotel. Then a loop should 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 rooms that are occupied on that floor. Then the loop calculates and displays the occupancy rate for that floor. After all the iterations, the program should display the total number of rooms the hotel has, the total number of rooms occupied in the hotel, and the total number of rooms that are vacant in the hotel, and the overall occupancy rate for the entire hotel. Input validation: 1. Do not accept a value less than 1 for the number of floors. 2. Do not accept the number less than 10 for the number or rooms on a floor. 3. Do not accept the number of occupied rooms on a floor greater than the number of available rooms for that floor
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
