Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java 7)- Hotel Occupancy A hotel's occupancy rate is calculated as follows Occupancy rate Number of rooms occupied /total number of rooms Write a program

image text in transcribed Java
7)- 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 the occupancy rate for each floor of a hotel The program should start by asking for the number of floors in the hotel A loop shouls then iterate once for eacb floor. During each iteration, the loop should ask the user for the number of rooms on the floor and the number of them that are occupied After all the iterations, the program should display the number that are vacant,and the occupancy rate for the hote Input Validation: Do not accept a value less than 1 for the number of fioor s. Do not accept a number less than 10 for the number of rooms on a floor

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

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions

Question

The organizations culture and politics

Answered: 1 week ago

Question

=+ Are they breakable for any reason?

Answered: 1 week ago