1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72

#include <iostream>
using namespace std;
//Global Constants
const double CALC_AREA_BASE = 115; /* area base for gallons of paint and hours of labor*/
const double GALLONS_PER_CALC_AREA_BASE = 1; /* 1 gallon paint per 115 sq. ft.*
const double LABOR_HOURS_PER_CALC_AREA_BASE = 8; /*8 hours of labor needed to paint 115 sq. ft.*/
const double LABOR_RATE = 20; //$20.00 per hour
//Function Prototypes
void userEnter(double &eArea, double &ePriceGallon);
void figureArea(double &eArea, double &fArea, double &ePriceGallon, double &neededGallon, double &hrsLabor, double &totalPaintcost, double &totalLaborWages);
void jobCost(double &totalLaborWages, double &totalPaintCost, double &totalJobCost);
int Main ()
{
// title of calculator
cout << "Estimate the Cost of a Paint Job." << endl;
double eArea = 0; // "e" entered
double fArea = 0; //"f" formula
double ePriceGallon = 0;
double neededGallon =0;
double hrsLabor = 0;
double wagesLabor = 0;
double totalPaintCost = 0;
double totalLaborWages = 0;
double totalJobCost = 0;
userEnter(eArea, ePriceGallon);
cout << "Are the amounts correct? If so press enter, if not press esc." << endl;
//problem area
figureArea(eArea, fArea, ePriceGallon, neededGallon, hrsLabor, totalPaintCost, totalLaborWages); // <<<<<<<<<<< this is the problem
cout <<"Gallons of paint needed: " << endl;
cout <<"Total price of paint: " << endl;
cout <<"Labor hours needed: " << endl;
cout <<"Labor cost: " << endl;
jobCost(totalLaborWages, totalPaintCost, totalJobCost);
cout << "The paint job total is: " << endl;
cin.get();
cin.get();
return 0;
}
void userEnter(double &eArea, double & ePriceGallon)
{
}
void figureArea(double &eArea, double &fArea, double &ePriceGallon, double &neededGallon, double &hrsLabor, double &totalPaintCost, double &totalLaborWages)
{
neededGallon = (eArea / CALC_AREA_BASE) * GALLONS_PER_CALC_AREA_BASE;
totalPaintCost = neededGallon * ePriceGallon;
hrsLabor = (eArea / CALC_AREA_BASE) * LABOR_HOURS_PER_CALC_AREA_BASE;
totalLaborWages = hrsLabor * LABOR_RATE;
}
void jobCost(double &totalLaborWages, double &totalPaintCost, double &totalJobCost)
{
totalJobCost = totalLaborWages + totalPaintCost; //this is the
}
