The labor cost is fixed at $0.35 per sqaure foor


Write a C++program that creates customers bills for a carpet company when the following information is given:

a. the length and the width of the carpet in feet
b. the carpet price per aquare foot
c. the percent of discount for each customer

The labor cost is fixed at $0.35 per sqaure foor. It is to be defined as a constant. The tax rate is 8.5% applied after the discount. It is also to be defined as a constant. The input data consist of a set of three integers representing the length and width of the room to be carpeted, the percentage of the discountthe owner gives to a customer, and a real number representing the unit price of the carpet. The program is to prompt the user for this input as shown below>

Length of room (feet)? 30
Width of room (feet)? 18
Customer discount (percentage)? 9
Cost per sqaure foot (xxx.xx)? 8.23 These are just example numbers to show allignment


MEASURMENT

Length xxx ft
Width xxx ft
Area xxx square ft

CHARGES

DESCRIPTION COST/SQ.FT. CHARGE
---------------- --------------- ---------------
Carpet xxx.xx $xxxx.xx
Labor 0.35 xxxx.xx
---------------
INSTALLED PRICE $xxxx.xx
Discount xx% xxxx.xx
---------------
SUBTOTAL $xxxx.xx
Tax xxxx.xx
TOTAL $xxxx.xx


The program cannot be written as one program. It has to be seperated into eight functions, and one main program that pulls from those functions.

The eight functions go into a header file called "my.h". we are to use that in the functions instead of #include, instead that is suppose to be in my own my.h header file.


This is my.h


#include

#define LABOR_COST 0.35
#define TAX_RATE 0.085

int main(void);

void read_data(int* length, int* width, int* cdiscount, double* costper);

void calculate_values(int lenght, int width, int cdiscount, double
costper, int* area, double* carpet, double* labor, double* installprice,
double* discountcharge, double* subtotal, double* taxcharge, double*
totalcharge);

void calculate_installedprice(int length, int width, int cdiscount,
double costper, int* area, double* carpet, double* labor, double*
installprice);

void calculate_subtotal(double* discount, double* subtotal, double
carpet, double labor);

void calculate_price(double* taxcharge, double* total, double subtotal);

void printresults(int length, int width, int area, double carpet, double
labor, double installprice, double discount, double subtotal, double
taxcharge, double total);

void printmeasurements(int length, int width, int area);

void printcharges(double carpet, double labor, double install, double
discount, double taxcharge, double totalcharge);


The problem i am having is writing the seperate functions. It doesn't make sense to me. I just can't understand how to set up each function so when i make the main program run using just the function. 

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: The labor cost is fixed at $0.35 per sqaure foor
Reference No:- TGS089222

Expected delivery within 24 Hours