Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Organic Chemistry

Authors: Joseph M. Hornback

2nd Edition

9781133384847, 9780199270293, 534389511, 1133384846, 978-0534389512