Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C++ program that creates customer's bills for a carpet company when the following information is given the length and the width of the

image text in transcribed

Write a C++ program that creates customer's bills for a carpet company when the following information is given the length and the width of the carpet in feet it the carpet price per square foot ii. the percent discount for each customer The labor cost is fixed at RM2.50 per square foot. It is to be defined as a constant. The tax rate is 5.5% applied after the discount. It is also to be defined as a constant. The input data consist of a set of three integers presenting the length and width of the room to be carpeted, the percentage of the discount the ownergies to a customes, and a real number representing the unit price of the carpet. The program is to prompt the user for this input as shown below. Sample Run : Langt To - 30 width o ruce 10 Custodistunt percent 10 93. MEASURE Length 30.00 18.00 140.00 CHURE CESCRIPTION COOT/80. Carpet Labar . M30 5. 350.00 2010 DISCOUNT 108): 620.46 The program's design should use the main function to complete the following tasks i Read data from the keyboard. This function is to use addresses to read all data and place them in the calling function's variables. Calculate and print the subtotal price, including the mathematical formule to calculate area, carpet cost and labor cost. Calculate and print the discount price on company offers . iv. Calculate and print Tax price based on a constant of 5.5% V. Calculate and print the total price with discount and tax Print the company header and measurements. You should apply modular programing design approach to answer this question. The program's design should use the main and at least the five functions with the function prototype as following: vaid thatatlost, toat. Float tontit vold printerent lost. float: double calculatebub Totatieat. teat. Feat disent, float cat , | anubis calestarmuthaan duble calculate caut fiat, toat) Write a C++ program that creates customer's bills for a carpet company when the following information is given the length and the width of the carpet in feet it the carpet price per square foot ii. the percent discount for each customer The labor cost is fixed at RM2.50 per square foot. It is to be defined as a constant. The tax rate is 5.5% applied after the discount. It is also to be defined as a constant. The input data consist of a set of three integers presenting the length and width of the room to be carpeted, the percentage of the discount the ownergies to a customes, and a real number representing the unit price of the carpet. The program is to prompt the user for this input as shown below. Sample Run : Langt To - 30 width o ruce 10 Custodistunt percent 10 93. MEASURE Length 30.00 18.00 140.00 CHURE CESCRIPTION COOT/80. Carpet Labar . M30 5. 350.00 2010 DISCOUNT 108): 620.46 The program's design should use the main function to complete the following tasks i Read data from the keyboard. This function is to use addresses to read all data and place them in the calling function's variables. Calculate and print the subtotal price, including the mathematical formule to calculate area, carpet cost and labor cost. Calculate and print the discount price on company offers . iv. Calculate and print Tax price based on a constant of 5.5% V. Calculate and print the total price with discount and tax Print the company header and measurements. You should apply modular programing design approach to answer this question. The program's design should use the main and at least the five functions with the function prototype as following: vaid thatatlost, toat. Float tontit vold printerent lost. float: double calculatebub Totatieat. teat. Feat disent, float cat , | anubis calestarmuthaan duble calculate caut fiat, toat)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases

Authors: Ian Robinson, Jim Webber, Emil Eifrem

1st Edition

1449356265, 978-1449356262

More Books

Students also viewed these Databases questions