Spring 2021 CMSC 140 Programming Project 3 -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...


Spring 2021 CMSC 140 Programming Project 3<br>-Use constant variables to hold room rates, max and min # of floors and rooms.<br>-The program should continuously ask for the correct floor number if it is not within the<br>range of 1 and 5.<br>-The program should continuously ask for the correct number of rooms for each floor if it<br>is not within the range of 1 and 30.<br>-The program should repeat the process of asking the number of rooms on the floor and<br>number of occupied rooms if the total number of occupied rooms exceeds the total<br>number of rooms on the floor.<br>Date due: Friday, April 9, 2021 at 11:59pm<br>Chapter(s) Covered:<br>Chapter 5<br>Concepts tested in this project<br>[All concepts covered by previous projects]<br>Repetition control structure<br>Sample output#1<br>The while/do-while statements<br>The for statement<br>BlueMont Hotel<br>Input validation<br>Enter the location for this hotel chain: Washington<br>Enter the total number of floors in this hotel: 0<br>Number of floors should be between 1 and 5. Please try again!!<br>Validate EACH user input with a while loop<br>Project Description<br>Enter the total number of floors in this hotel: 6<br>Number of floors should be between 1 and 5. Please try again!!<br>The BlueMont chain hotels have 4 different types of rooms:<br>Enter the total number of floors in this hotel: 1<br>Single room: $60/night<br>Double room: $75/night<br>King room: $100/night<br>Suite room: $150/night<br>Enter the total number of rooms on floor 1 : 0<br>Number of rooms should be between 1 and 30. Please try again!!<br>The size of the hotel chains in different locations may be different in terms of the number<br>of floors and the type and the number of rooms on each floor.<br>Enter the total number of rooms on floor 1 : 31<br>Number of rooms should be between 1 and 30. Please try again!!<br>You are required to write a program that calculates the occupancy rate and the total hotel<br>income for one night and displays this information as well as some other information<br>described below.<br>Enter the total number of rooms on floor 1 : 30<br>How many SINGLE rooms are occupied on floor 1 ? 10<br>How many DOUBLE rooms are occupied on floor 1 ? 0<br>How many KING rooms are occupied on floor 1 ? 0<br>How many SUITES are occupied on floor 1 ? 0<br>The program starts by asking the location where this hotel chain is located and the<br>number of floors in the hotel. The number of floors may not exceed 5. The User then<br>enters the total number of rooms for each floor. The program then asks specifically for the<br>number of occupied rooms for each room type on this floor. The total number of rooms on<br>each floor may not exceed 30 and the program should check that the total number of<br>occupied rooms on each floor does not exceed the total of rooms on that floor.<br>BlueMont Hotel located at Washington<br>Today's Room Rates (Us$/night)<br>Double Room<br>Single Room<br>King Room<br>Suite Room<br>60<br>75<br>100<br>150<br>After the information is entered for each floor, the program calculates the following:<br>===== =====<br>Hotel Income :<br>$600<br>Total # of Rooms :<br>30<br>- Hotel income (based on the room type and its rate),<br>- The total number of occupied rooms,<br>- Total number of the uncopied rooms,<br>- The rate of occupancy,<br>- Floor number with the minimum number of rooms. (Assume no two floors have the<br>same number of rooms).<br>- A message to improve the occupancy rate for the occupancy rate of less than 60%.<br>Programmer's full name<br>- Project number<br>Project due date<br>Project Specifications<br>Total # of Occupied Rooms :<br>Total # of Unoccupied Rooms :<br>Occupancy Rate :<br>10<br>20<br>33.33%<br>floor 1 with 30 rooms has the least # of rooms.<br>Need to improve Hotel occupancy rate!!<br>Thank you for testing my program!<br>PROGRAMMER: insert your name here<br>CMSC140 Common Project 3<br>Due Date: April 9, 2021<br>1<br>

Extracted text: Spring 2021 CMSC 140 Programming Project 3 -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. Date due: Friday, April 9, 2021 at 11:59pm Chapter(s) Covered: Chapter 5 Concepts tested in this project [All concepts covered by previous projects] Repetition control structure Sample output#1 The while/do-while statements The for statement BlueMont Hotel Input validation Enter the location for this hotel chain: Washington Enter the total number of floors in this hotel: 0 Number of floors should be between 1 and 5. Please try again!! Validate EACH user input with a while loop Project Description Enter the total number of floors in this hotel: 6 Number of floors should be between 1 and 5. Please try again!! The BlueMont chain hotels have 4 different types of rooms: Enter the total number of floors in this hotel: 1 Single room: $60/night Double room: $75/night King room: $100/night Suite room: $150/night Enter the total number of rooms on floor 1 : 0 Number of rooms should be between 1 and 30. Please try again!! 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. Enter the total number of rooms on floor 1 : 31 Number of rooms should be between 1 and 30. Please try again!! 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. Enter the total number of rooms on floor 1 : 30 How many SINGLE rooms are occupied on floor 1 ? 10 How many DOUBLE rooms are occupied on floor 1 ? 0 How many KING rooms are occupied on floor 1 ? 0 How many SUITES are occupied on floor 1 ? 0 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 for 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. BlueMont Hotel located at Washington Today's Room Rates (Us$/night) Double Room Single Room King Room Suite Room 60 75 100 150 After the information is entered for each floor, the program calculates the following: ===== ===== Hotel Income : $600 Total # of Rooms : 30 - 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%. Programmer's full name - Project number Project due date Project Specifications Total # of Occupied Rooms : Total # of Unoccupied Rooms : Occupancy Rate : 10 20 33.33% floor 1 with 30 rooms has the least # of rooms. Need to improve Hotel occupancy rate!! Thank you for testing my program! PROGRAMMER: insert your name here CMSC140 Common Project 3 Due Date: April 9, 2021 1
Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here