Question: Paint Project A remodeling company needs a program to determine the cost of painting a room. Write a C++ program that lets the user enter

 Paint Project A remodeling company needs a program to determine the
cost of painting a room. Write a C++ program that lets the

Paint Project A remodeling company needs a program to determine the cost of painting a room. Write a C++ program that lets the user enter the length and width of a room in feet as integers, and then calculates the total square footage of the room, the number of cans of paint rounded to the next whole number, and the cost of the paint. The height of the room is 8 feet, and the price of a can of paint is 12.99. A one-gallon can of paint covers 250 square feet. You do not need to factor in the area for doors and windows, but include the ceiling. There are a number of ways to solve this problem. You may want to check the description for the ceil and floor functions in Display 4.2. The program should loop until the user enters 0 for length. Use the pretest while structure as you did in Project Two. The loop structure should be part of the main function. The program includes the following functions: Be sure to use the function names provided. Do not change the specifications for the functions. displayTitle This function displays a title for the window. display Title is an example of a void function (Section 5.1). getData This function displays a prompt requesting the value for the length. If 0 is not entered for the length, the function displays a prompt requesting the width. This function is a call-by-reference since it needs to supply main with two values. Check Display 5.4 getNumbers function and Display 5-9 getInput function. The rest of the functions are call-by-value. Do not use call call-by-reference. calcSqFt This function receives the values for length and width, and calculates the square footage including the ceiling. The function returns an integer to main. calc TotalCans This function calculates and returns the number of cans needed rounding up to the next whole number. calcCost This function calculates and returns the total cost. displayResults This function receives the numeric results to display. Note how the decimals are aligned for readability in the sample run. displayMsg This function displays a message reporting a free gift based on the number of cans purchased. Be sure to use a nested if. The customer only receives one free gift. 1 - 3 cans 4-7 cans More than 7 cans - free paint brush. - free paint tray. - $10 gift card. Here is a sample run: Chesapeake Remodeling Company Paint Costing Enter length in feet (o to stop>...19 Enter width in feet.... ...12 Square footage = 472 Cans Cost 25.98 Thank you for your purchase. Gift = free paint brush. Enter length in feet ( to stop)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!