Write a program called estimator.cpp, which estimates the cost of a paint job from a painting company. The painting company has determined that for every 110 square feet of wall space, 1 gallon of...


The solution task must use functions, it must do proper validation of values entered by the user.


Write a program called estimator.cpp, which estimates the cost of a paint job from a painting<br>company. The painting company has determined that for every 110 square feet of wall space, 1<br>gallon of paint and 8 hours of labor will be required. The company charges $25.00 per hour for<br>labor. Write a modular program that allows the user to enter the number of rooms that are to be<br>painted and the price of the paint per gallon. It should also ask for the square feet of wall space in<br>each room. It should then display the following data:<br>The number of gallons of paint required<br>• The hours of labor required<br>The cost of the paint<br>• The labor charges<br>The total cost of the paint job<br>Input validation: Do not accept a value less than 1 for the number of rooms. Do not accept a value<br>less than $10.00 for the price of paint. Do not accept a negative value for the square footage of<br>wall space. Your program should be broken up into multiple functions. The function prototypes<br>indicated below are the suggested ones that you should include at a minimum:<br>int getNumberofRooms ();<br>double getPaintPrice ();<br>double getWallsquareFeet ();<br>int numberofGallons (double wallArea);<br>double laborHours (double wallArea);<br>void displayCost (int gallons, double paintPrice, double hours);<br>Define the following two named constant as shown below before the main function and<br>incooperated into them into your source code:<br>// Constant for the wall area that one gallon of paint will cover.<br>const int WALL_AREA_PER_GALLON = 110;<br>// Constant for the hourly rate for labor.<br>const double HOURLY_RATE = 25.0;<br>%3D<br>Sample Output<br>Enter the number of rooms to be painted: 3<br>Enter the price of the paint, per gallon: 36. 99<br>Room 1: Enter the area of wall space in square feet: 850<br>Room 2: Enter the area of wall space in square feet: 680<br>Room 3: Enter the area of wall space in square feet: 1280<br>ESTIMATED CHARGES<br>========- --<br>==<br>Gallons of paint:<br>Price per gallon:<br>Paint cost:<br>26<br>$36.99<br>$961.74<br>Hours of labor:<br>638.64<br>Total charges:<br>$1600.38<br>

Extracted text: Write a program called estimator.cpp, which estimates the cost of a paint job from a painting company. The painting company has determined that for every 110 square feet of wall space, 1 gallon of paint and 8 hours of labor will be required. The company charges $25.00 per hour for labor. Write a modular program that allows the user to enter the number of rooms that are to be painted and the price of the paint per gallon. It should also ask for the square feet of wall space in each room. It should then display the following data: The number of gallons of paint required • The hours of labor required The cost of the paint • The labor charges The total cost of the paint job Input validation: Do not accept a value less than 1 for the number of rooms. Do not accept a value less than $10.00 for the price of paint. Do not accept a negative value for the square footage of wall space. Your program should be broken up into multiple functions. The function prototypes indicated below are the suggested ones that you should include at a minimum: int getNumberofRooms (); double getPaintPrice (); double getWallsquareFeet (); int numberofGallons (double wallArea); double laborHours (double wallArea); void displayCost (int gallons, double paintPrice, double hours); Define the following two named constant as shown below before the main function and incooperated into them into your source code: // Constant for the wall area that one gallon of paint will cover. const int WALL_AREA_PER_GALLON = 110; // Constant for the hourly rate for labor. const double HOURLY_RATE = 25.0; %3D Sample Output Enter the number of rooms to be painted: 3 Enter the price of the paint, per gallon: 36. 99 Room 1: Enter the area of wall space in square feet: 850 Room 2: Enter the area of wall space in square feet: 680 Room 3: Enter the area of wall space in square feet: 1280 ESTIMATED CHARGES ========- -- == Gallons of paint: Price per gallon: Paint cost: 26 $36.99 $961.74 Hours of labor: 638.64 Total charges: $1600.38
Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here