Question

A painting company has determined that to paint 115 square feet of wall space, the task...

A painting company has determined that to paint 115 square feet of wall space, the task will require one gallon of paint and 8 hours of labor. The company charges $20.00 per hour for labor. Design a modular program that asks the user to enter the number of square feet of wall space to be painted and the price of paint per gallon. The program should then calculate and 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

Your program should contain the following modules:

  • Module main. Accepts user input of the wall space (in square feet) and the price of a gallon of paint. Calculates the gallons of paint needed to paint the room, the cost of the paint, the number of labor hours needed, and the cost of labor. Calls summaryPaint, passing all necessary variables.

  • Module summaryPaint. Accepts the gallons of paint needed, the cost of the paint, the number of labor hours needed, and the cost of labor. Calculates and displays total cost of the job and statistics shown in the Expected Output.

Expected Output

Enter wall space in square feet: 500

Enter price of paint per gallon: 25.99

Gallons of paint: 4.3478260869565215

Hours of labor: 34.78260869565217

Paint charges: $112.99999999999999

Labor charges: $695.6521739130435

Total Cost: $808.6521739130435

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Note: Could you plz go through this code and let me know if u need any changes in this.Thank You
_________________


#include <iostream>
using namespace std;
// Function Declarations
double costOfPaint(double paint_required, double price);
double totalCost(double cost_of_paint, double labor_charges);
double calLaborCharges(double hours);
double paintReq(int wall_space);
double hoursOfLabor(int wall_space);
int main()
{ // Declaring variables
int wall_space;
double price;
// Getting the wall space
cout << "Enter the wall space in square feet:";
cin >> wall_space;
// Getting the price of the paint per gallon entered by the user
cout << "Enter the Price of paint per gallon:";
cin >> price;
// Calling the functions
double paint_required = paintReq(wall_space);
double cost_of_paint = costOfPaint(paint_required, price);
double hours = hoursOfLabor(wall_space);
double labor_charges = calLaborCharges(hours);
double tot_cost = totalCost(cost_of_paint, labor_charges);
// Displaying the results
cout << "Gallons of paint: " << paint_required << endl;
  
cout << "Hours Of labor :" << hours << endl;
cout << "Paint Charges :$" << cost_of_paint << endl;
cout << "Labor charges :$" << labor_charges << endl;
cout << "Total cost :$" << tot_cost << endl;

return 0;
}
// Function which calculate the cost of paint
double costOfPaint(double paint_required, double price)
{
return paint_required * price;
}
// Function which calculate the total cost
double totalCost(double cost_of_paint, double labor_charges)
{
return (cost_of_paint + labor_charges);
}
// Function which calculate the labor charges
double calLaborCharges(double hours)
{
return hours * 20;
}
// Function which calculate the hors of labor required
double hoursOfLabor(int wall_space)
{
return ((double)wall_space / 115) * 8;
}
// Function which calculate the no of gallons of paint required
double paintReq(int wall_space)
{
return (double)wall_space / 115;
}
_______________________

Output:

_______________Could you plz rate me well.Thank You

Add a comment
Know the answer?
Add Answer to:
A painting company has determined that to paint 115 square feet of wall space, the task...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • in python A painting company has determined that for every 112 square feet of wall space,...

    in python A painting company has determined that for every 112 square feet of wall space, one gallon of paint and eight hours of labor will be required. The company charges $35.00 per hour for labor. Write a program that asks the user to enter the square feet of wall space to be painted and the price of the paint per gallon. The program should display the following data: The number of gallons of paint required The hours of labor...

  • A painting company has determined that for every 115 square feet of wall space, one gallon...

    A painting company has determined that for every 115 square feet of wall space, one gallon of paint and eight hours of labor will be required. The company charges $20.00 per hour for labor. Write a program that allows the user to enter the number of rooms to be painted and the price of the paint per gallon. It should ask for the square feet of wall space in each room. The program should have methods that return the following...

  • A painting company has determined that for every 110 square feet of wall space, one gallon...

    A painting company has determined that for every 110 square feet of wall space, one gallon of paint and eight 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 (different colors) and the price of the paint per gallon. It should also ask for the square feet of wall space in each room. Rooms and gallons...

  • A painting company has determined that for every 112 square feet of wall space, one gallon...

    A painting company has determined that for every 112 square feet of wall space, one gallon of paint and eight hours of labor will be required. The company charges $35.00 per hour for labor. Write a program that asks the user to enter the square feet of wall space to be painted and the price of the paint per gallon. Use a function (or multiple functions if you want) to calculate the following values - you also need to output...

  • This exercise requires designing a program which solves the problem described in the problem statement below....

    This exercise requires designing a program which solves the problem described in the problem statement below. Provide comments as necessary in your pseudo-code and the Java program. Your solution must include these components: Flowchart Pseudo-code Hierarchy Chart Program Coded Program Output Problem Statement A painting company has determined that to paint 115 square feet of wall space, the task will require one gallon of paint and 8 hours of labor. The company charges $20.00 per hour for labor. Design a...

  • Tasks: Complete the following programs noted below: Problem 1: A painting company has determined that for...

    Tasks: Complete the following programs noted below: Problem 1: A painting company has determined that for 112 square feet of wall space, one gallon of paint and eight hours of labor will be required. The company charges $35.00 per hour for labor. Write a program that asks the user to enter the square feet of wall space to be painted and the price of paint per gallon. The program should display the following data: The use of functions is required....

  • I need help making a javascript program to do the following: A painting company has determined...

    I need help making a javascript program to do the following: A painting company has determined that for every 112 square feet of wall space, one gallon of paint and eight hours of labor will be required. The company charges $35.00 per hour for labor and $15.00 for a gallon of paint. Write a function that takes in the number of square feet of wall space and displays the following data: The number of gallons of paint required The hours...

  • Paint Job Estimator in Python and Raptor Psusedo

    Hello, I have seen this in Java and C++ but I am trying to learn it in Python ..any help on the code would be great..ThanksPaint job estimatorQuestion DetailsA painting company has determined that for every 115 square feet or wall space, one gallon of paint and eight hours of labor will be required. The company charges$20.00 per hour for labor . Write a program that allows the user to enter the number of rooms to be painted and the...

  • PLEASE HELP WITH CODE PYTHON BASE.!!!!!!!! Tasks: Complete the following programs noted below: Problem 1: A...

    PLEASE HELP WITH CODE PYTHON BASE.!!!!!!!! Tasks: Complete the following programs noted below: Problem 1: A painting company has determined that for 112 square feet of wall space, one gallon of paint and eight hours of labor will be required. The company charges $35.00 per hour for labor. Write a program that asks the user to enter the square feet of wall space to be painted and the price of paint per gallon. The program should display the following data:...

  • I need to write a paint job estimator program in python. I have most of it...

    I need to write a paint job estimator program in python. I have most of it down but i keep getting errors and I dont know how to fix it or what im doing worng specs: A painting company has determined that for every 350 square feet of wall space, one gallon of paint and six hours of labor are required. The company charges $62.25 per hour for labor. Write a program call paintjobestimator.py that asks the user to enter...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT