### Occupancy rate for floor

Assignment Help Basic Computer Science
##### Reference no: EM131218132

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

For example: A hotel has 4 floors.

Floor 1: 100 rooms, 60 occupied. Then the occupancy rate for floor 1 is 0.60.

Floor 2: 150 rooms, 90 occupied. Then the occupancy rate for floor 2 is 0.60

Floor 3: 60 rooms, 50 occupied. Then the occupancy rate for floor 3 is 0.86

Floor 4: 90 rooms, 45 occupied. The the occupancy rate for floor 4 is 0.50

Altogether, the hotel has 400 rooms, 245 rooms are occupied, 195 rooms are vacant. The overall occupancy rate for the hotel is 0.61

Requirements: turn in the .java file

#### Write a program that reads three integers and print

Write a program that reads three integers and print "In order" if they are sorted in ascending order or descending order, or "not in order" otherwise. For example: 1 2 5 in

#### Create an instance variable credit limit to indicate

Create another sub class CreditCustomer. Create an instance variable credit limit to indicate the maximum limit (\$500). Credit customers get a markup of 2% on the order pric

#### Important aspect of formatting

1. Which rules does an expert have to follow to prepare and submit a report? 2. What is destroying a report before the final resolution of a case called? 3. When writing a rep

#### Whether each of the new expressions is true or false

Height of the beach house is less than the height of the lighthouse and not height of the lighthouse is less than the height of the tree or height of the beach house equals

#### Responsibility to maintain ethical standard in department

Do managers have a responsibility to maintain an ethical standard within a department? If so, how is the expected ethical standard established? How is it documented? How is

#### Multimedia can be difficult to view on a mobile device

Some multimedia can be difficult to view on a mobile device due to screen size or bandwidth limitations. Find two articles that discuss considerations and new developments tha

#### Deriving logging information for chinese wall model

In the example of deriving required logging information for the Chinese Wall model, it is stated that the time must be logged.Why? Explain.

#### Compare the computational complexity of the laplacian

Compare the computational complexity of the Laplacian regularized least-squares algorithm with that of the regularized least-squares algorithm using labeled examples only.