Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Can you please help me with this?

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

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91974091
  • Price:- $15

Priced at Now at $15, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Sunland industries has a three-year bond outstanding that

Sunland Industries has a three-year bond outstanding that pays a 7.80 percent coupon rate and is currently priced at $938.80. What is the yield to maturity of this bond? Assume annual coupon payments.  (Round answer to 2 ...

Objectiveto apply object-oriented methodology for analysis

Objective To apply object-oriented methodology for analysis of information systems development in a case study. Case Study -Chemist ServiceGroup Chemist Service group is a chainof chemiststores. It employs more than8,000 ...

Assignment week 5 bugs vs feature requeststhere is no such

Assignment: Week 5 Bugs vs. Feature Requests There is no such thing as a bug-free IT project. Because bugs are a fact of IT project life, IT project managers must articulate a process for identifying, tracking, and handl ...

Question state the considerations of selecting and handling

Question : State the considerations of selecting and handling participants for a usability experiment. Describe and compare types of usability testing.

Systems analysis and design projectpersonal trainer inc

Systems Analysis and design project Personal Trainer, Inc. owns and operates fitness centers in a dozen Midwestern cities. The centers have done well, and the company is planning an international expansion by opening a n ...

Suppose you make 30 annual investments in a fund that pays

Suppose you make 30 annual investments in a fund that pays 6% compounded annually. If your first deposit is $7,500 and each successive deposit is 6% greater than the preceding deposit, how much will be in the fund immedi ...

Question suppose you transferred three packets each

Question : Suppose you transferred three packets each containing 1000 bytes of data from one system to another. The entire process took 1 minute and 20 seconds. What is the data rate (bits/sec) of this transmission? Can ...

What are the best practices to follow for microsoft windows

What are the best practices to follow for Microsoft Windows network security. Which two would you start with and why?

Question suppose that nickels and pennies disappear from

Question : Suppose that nickels and pennies disappear from the currency system and we have only dimes and quarters. Obviously any product that costs 15 cents can not be exactly paid for using only dimes and quarters. Sho ...

Question cybersecurity policy design issues1describe

Question: Cybersecurity Policy Design Issues 1. Describe cybersecurity roles and responsibilities to protect security for the corporate business mission (for example, the Insider threat, Access Controls, Biometric Authen ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As