Project Description

The BlueMont chain hotels have 4 different types of room:

Single room: $60/night
Double room: $75/night
King room: $100/night
Suite room: $150/night

The size of the hotel chains in different locations may be different in terms of the number of floors and the type and the number of rooms on each floor.

You are required to write a program that calculates the occupancy rate and the total hotel income for one night and displays this information as well as some other information described below.

The program starts by asking the location where this hotel chain is located and the number of floors in the hotel. The number of floors may not exceed 5. The User then enters the total number of rooms for each floor. The program then asks specifically the number of occupied rooms for each room type on this floor. The total number of rooms on each floor may not exceed 30 and the program should check that the total number of occupied rooms on each floor does not exceed the total of rooms on that floor.

After the information is entered for each floor, the program calculates the following:

  • Hotel income (based on the room type and its rate),
  • The total number of occupied rooms,
  • Total number of the uncopied rooms,
  • The rate of occupancy,
  • Floor number with the minimum number of rooms. (Assume no two floors have the same number of rooms).
  • A message to improve the occupancy rate for the occupancy rate of less than 60%.

Project Specifications

  • Use constant variables to hold room rates, max and min # of floors and rooms.
  • The program should continuously ask for the correct floor number if it is not within the range of 1 and 5.
  • The program should continuously ask for the correct number of rooms for each floor if it is not within the range of 1 and 30.
  • The program should repeat the process of asking the number of rooms on the floor and number of occupied rooms if the total number of occupied rooms exceeds the total number of rooms on the floor.
  • Refer to Sample outputs for more clarification.

Sample output #1: see image.

Sample output #2: see image.

Sample output #3: see image.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.