CMSC140 Project 3 Solved

30.00 $

Category:

Description

5/5 - (1 vote)

Chapter(s) Covered:

• Chapter 5
Concepts tested in this project

• [All concepts covered by previous projects]
• Repetition control structure o The do.. while/while statements o The for statement
• Input validation o Use a repetition control structure for EACH user input

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

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.

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%. – Programmer’s full name
– Project number

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

Sample output#2

Sample Output #3

Special Project Submission Requirements

Deliverables:
• Intermediate deliverable:

NOTE: Be sure to check also
1. CMSC140 Common Project Submission Requirements (.docx) 2. CMSC140 Grading Rubric_CheckList-Project 3 (.xlsx)

Test Plan Template
Test your program with at least 3 more test cases. Use the given data as an example. Record your data for input and output in the following table. Make sure your tests cover all the possible scenarios.
Test
Case # Input Actual Input Expected Output
Actual Output

Did the test pass?

1 loc: Washington
#of floors: 0

Number of floors should be between 1 and 5.
Please try again!!
2
3
4

  • CMSC140_Assignment3-bkrgyh.zip