Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Independent completion of this programming because the code check will be used (MOSA stealing software detection code is from the network or is not from

Independent completion of this programming because the code check will be used (MOSA stealing software detection code is from the network or is not from yourself). So should be done alone ( Avoid detection by the code detector), Thank you.

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed
[All concepts covered by previous projects] Repetition control structure 0 The while/do-while statements 0 The for statement Input validation o Validate EACH user input with a while loop riI Pr D The BIueMont chain hotels have 4 different types of rooms: Single room: $60ight Double room: $75ight King room: $100ight Suite room: $150ight The size of the hotel chains in different locations may be different in terms of the number of oors 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 m 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 oors 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 oor. The total number of rooms 93 each oor may not exceed 3g and the program should check that the total number of occupied rooms on each floor does not exceed the total of rooms on that oor. 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 oors have the same number of rooms). - A message to improve the occupancy rate for the occupancy rate of less than 60%. - full name - Project number - Project due date LmssLSpssm -Use constant variables to hold room rates, max and min # of floors and rooms. Sample output#2 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 BlueMont Hotel 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 Enter the location for this hotel chain: LA number of occupied rooms if the total number of occupied rooms exceeds the total Enter the total number of floors in this hotel: 2 number of rooms on the floor. Sample output#1 Enter the total number of rooms on floor 1 : 20 How many SINGLE rooms are occupied on floor 1 ? 10 How many DOUBLE rooms are occupied on floor 1 ? 2 Enter the location for this hotel chain: Washington How many KING rooms are occupied on floor 1 ? 1 Enter the total number of floors in this hotel: 0 How many SUITES are occupied on floor 1 ? 1 Number of floors should be between 1 and 5. Please try again! ! Enter the total number of floors in this hotel: 6 Number of floors should be between 1 and 5. Please try again! ! Enter the total number of rooms on floor 2 : 10 How many SINGLE rooms are occupied on floor 2 ? Enter the total number of floors in this hotel: 1 How many DOUBLE rooms are occupied on floor 2 ? 1 How many KING rooms are occupied on floor 2 ? 0 How many SUITES are occupied on floor 2 ? 0 Enter the total number of rooms on floor 1 : 0 Number of rooms should be between 1 and 30. Please try again! ! Enter the total number of rooms on floor 1 : 31 Number of rooms should be between 1 and 30. Please try again! ! BlueMont Hotel located at LA Enter the total number of rooms on floor 1 : 30 Today's Room Rates (Us$ight) How many SINGLE rooms are occupied on floor 1 ? Single Room Double Room King Room Suite Room How many DOUBLE rooms are occupied on floor 1 ? e 60 75 100 150 How many KING rooms are occupied on floor 1 ? e How many SUITES are occupied on floor 1 ? 0 Hotel Income $1375 Total # of Rooms 30 Total # of Occupied Rooms 20 10 BlueMont Hotel located at Washington Total # of Unoccupied Rooms Occupancy Rate : 66 . 67% Today's Room Rates (Us$ight) Single Room Double Room King Room Suite Room floor 2 with 10 rooms has the least # of rooms. 60 100 150 Hotel Income $600 Thank you for testing my program! Total # of Rooms : 30 PROGRAMMER: insert your name here Total # of Occupied Rooms 10 CMSC140 Common Project 3 Total # of Unoccupied Rooms 20 Due Date: April 9, 2021 Occupancy Rate : 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 3Sample Output #3 Special Project Submission Requirements BlueMont Hotel Deliverables: Enter the location for this hotel chain: LA 1. Documentation (a Word or PDF file). Your documentation should include items listed Enter the total number of floors in this hotel: 1 below. 2. Your source code (a .cpp file). Your source code file should include a block comment Enter the total number of rooms on floor 1 : 10 (header) listed How many SINGLE rooms are occupied on floor 1 ? 10 How many DOUBLE rooms are occupied on floor 1 ? 1 How many KING rooms are occupied on floor 1 ? 0 How many SUITES are occupied on floor 1 ? e Details for Deliverables: Total number of occupied rooms exceeds the total number of rooms on this floor. Please try again! ! The above deliverables will be packaged as follows: 1. Documentation: Word document(docx) or .pdf including: a. Title page including student name, project title and number inter the total number of rooms on floor 1 : 20 How many SINGLE rooms are occupied on floor 1 ? 10 b. Completed Test Plan table contains How many DOUBLE rooms are occupied on floor 1 ? 2 i. SEPARATE columns for EACH data item used in the program, i.e. all How many KING rooms are occupied on floor 1 ? 2 variables and constants declared in the program How many SUITES are occupied on floor 1 ? 2 ii. each column should have column heading, preferably names used in the program iii. at least three COMPLETE sets of test data that is enough to run the BlueMont Hotel located at LA program at least three times c. Screenshot of the program run (using test data from the Test Plan) Today's Room Rates (Us$ight) d. Flowchart Single Room Double Room King Room Suite Room 60 75 100 150 e. Pseudocode f . Hotel Income : $1250 work on the project and how you solved them or your overall experience. Total # of Rooms : 20 Total # of Occupied Rooms : 16 Total # of Unoccupied Rooms : 2. C++ files (source code): FirstInitialLastName_Pr3.cpp Occupancy Rate : 80.00% Program Header: All programming source code needs to have one block comment at the top of the program containing the course name and CRN, the Floor 1 with 20 rooms has the least # of rooms. project number, your name, project description, and the due date. Provide any additional comments as necessary to clarify the program. Thank you for testing my program! Following is a template of the required program header: PROGRAMMER: insert your name here CMSC140 Common Project 3 Due Date: April 9, 2021 5PROJECT 3 Rubric The following are components on which the projects will be graded. If program does not compile, Comments: Add comment to variables, formulas, or any part of the program with project will get grade Contact your instructor prior to the project submission due date, if you have the purpose of making the source code easier to understand. compilation issues. Indentation: It must be consistent throughout the program and must reflect the control structure. Possible total grade: 100 Points (points) Earned Proper naming conventions: Variable and method names need to be descriptive to Planning show the role of the variable or method. Avoid single letter names. Constant names Flowchart submitted 5 lower case, with subsequent words starting with upper case: hoursWorked ) Pseudocode provided 5 DO NOT USE ARRAYS. USE ONLY ONE FUNCTION MAIN. All statements in Test plan/data provided 5 your code should be described in Chapters 1 5. Testing Test Plan Template Passes sample data tests Passes student data tests 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 Passes private instructor data tests 65 cover all the possible scenarios. Possible Subtotal 100 REQUIREMENTS (Subtracts from Planning and Testing totals) Input Output Te # of # of Single Double King Suite Documentation st Floors room Screenprints/Screenshots of program run not provided # -3 Learning Experience not included -4 1 0, 6 Program header within source code is missing, incomplete, or incorrect -10 Deliverables packaged incorrectly or incomplete - 3 BlueMont Hotel mming Style incorrect use of indentation, naming convention, -5 white space, etc. User interface not clear how data is to be entered (-4) or output is not -8 Enter the location for this hotel chain: Washington understand (-4) Enter total number of floors on this hotel: 0 Does not use required control structures (-10), check if the number of -20 occupied rooms exceeds the total(3), or operators (-7) Number of floors should be between 1 and 5. Please try again! Enter total number of floors on this hotel: Does not take all required input (5) Input validation not performed or -10 incomplete, without loops (5 Number of floors should be between 1 and 5. Please try again! Does not display all output with appropriate labels. -20 Enter total number of floors on this hotel: Does not use appropriate data types (-10) -10 Comments are not included with variables (-5) Too few with code(-5) -10 UT D W N Comments

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

What nutrients are needed for erythropoiesis?

Answered: 1 week ago

Question

price decrease.

Answered: 1 week ago