Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Program name: pgm1c.cpp Program Assignment: Write a C++program to help a local b

ID: 3611746 • Letter: P

Question

Program name: pgm1c.cpp Program Assignment: Write a C++program to help a local builder calculate the total cost of a newwindow. The cost of a window includes the glass and framing at thefollowing rates: Glass: $5.50 per squarefoot                    Framing: $8.60 per ft Sales tax equal to 5.5 percent of the glass and framing costis added to the bill. The labor rate for installation of the windowis $11.25 per square foot. No tax is charged on labor. Input: Prompt the user to enterthe height and width of a windowin feet. Use the cin statement for input and cout for yourprompt. Calculations: Perform thefollowing calculations to find the cost for a window with thedimensions entered by the user:      The size of the window in square feet(glass area) = height * width      Cost of glass = window sizein square feet * cost of glass per square feet      The linear feet of framing needed = 2* (height + width)      Cost of framing = linear feetneeded * cost per linear feet      Sales tax = tax percent * thecost of both the glass and framing      Labor cost = labor rate * sizeof window (square feet ) purchased      Total cost of window = Cost ofglass + cost of framing + sales tax + labor cost Output: Use cout to output theheight and width of the window,the glass area, cost of theglass, linear feet of flaming, the cost of the framing,the sales tax, laborcost, and the total cost for a window. Formatof output is shown ahead. Test your program with several different window heights andwidths. Do the calculations by hand and compare them to yourprogram results to make sure that your program is workingcorrectly. Program documentation and style: 1) Declare all variables and constants that your program usesat the beginning of your program. 2) Your program should include two types of comments:     a. Header comments at the topincluding lines with:          - Your name,course name, and class time          -Program assignment number, program file name(window_cost.cpp) anddue date          - Asentence or two explaining the purpose of the program          - Adescription of the input data needed by the program when you runit          - Adescription of the processing (calculations) done by theprogram          - Adescription of the results (output) produced by the program     b. In-line comments: There should bean in-line comment for each main step in your program. In general, this means a comment with each group of C++ statementsthat handles the input, the processing and the ouput steps of yourprogram. 3) Use meaningful identifier names 4) Include clear prompts for the user about entering thedate. 5) Include clear descriptions of the results when you displaythem Sample Output:          Enter theheight of the window: <user enters 4>          Enter thewidth of the window: < user enters 3.5>                   The costinformation for the window is          Glass area: 14          Cost of glass: $ 77.0          Linear feetof framing : 15          Cost offraming : $ 129.0          Salestax: $ 11.33          Labor cost :$ 157.5          Total windowcost : $ 374.83 Program name: pgm1c.cpp Program Assignment: Write a C++program to help a local builder calculate the total cost of a newwindow. The cost of a window includes the glass and framing at thefollowing rates: Glass: $5.50 per squarefoot                    Framing: $8.60 per ft Sales tax equal to 5.5 percent of the glass and framing costis added to the bill. The labor rate for installation of the windowis $11.25 per square foot. No tax is charged on labor. Input: Prompt the user to enterthe height and width of a windowin feet. Use the cin statement for input and cout for yourprompt. Calculations: Perform thefollowing calculations to find the cost for a window with thedimensions entered by the user:      The size of the window in square feet(glass area) = height * width      Cost of glass = window sizein square feet * cost of glass per square feet      The linear feet of framing needed = 2* (height + width)      Cost of framing = linear feetneeded * cost per linear feet      Sales tax = tax percent * thecost of both the glass and framing      Labor cost = labor rate * sizeof window (square feet ) purchased      Total cost of window = Cost ofglass + cost of framing + sales tax + labor cost Output: Use cout to output theheight and width of the window,the glass area, cost of theglass, linear feet of flaming, the cost of the framing,the sales tax, laborcost, and the total cost for a window. Formatof output is shown ahead. Test your program with several different window heights andwidths. Do the calculations by hand and compare them to yourprogram results to make sure that your program is workingcorrectly. Program documentation and style: 1) Declare all variables and constants that your program usesat the beginning of your program. 2) Your program should include two types of comments:     a. Header comments at the topincluding lines with:          - Your name,course name, and class time          -Program assignment number, program file name(window_cost.cpp) anddue date          - Asentence or two explaining the purpose of the program          - Adescription of the input data needed by the program when you runit          - Adescription of the processing (calculations) done by theprogram          - Adescription of the results (output) produced by the program     b. In-line comments: There should bean in-line comment for each main step in your program. In general, this means a comment with each group of C++ statementsthat handles the input, the processing and the ouput steps of yourprogram. 3) Use meaningful identifier names 4) Include clear prompts for the user about entering thedate. 5) Include clear descriptions of the results when you displaythem Sample Output:          Enter theheight of the window: <user enters 4>          Enter thewidth of the window: < user enters 3.5>                   The costinformation for the window is          Glass area: 14          Cost of glass: $ 77.0          Linear feetof framing : 15          Cost offraming : $ 129.0          Salestax: $ 11.33          Labor cost :$ 157.5          Total windowcost : $ 374.83

Explanation / Answer

please rate - thanks hope this gets you started #include #include using namespace std; int main() {double height, width, glassarea, glasscost; double ftframe, costframe, tax, labor, total; coutheight; coutwidth; glassarea=height*width; glasscost=glassarea*5.5; ftframe=2*(height+width); costframe=ftframe*8.6; tax=(glasscost+costframe)*.055; labor=11.25*glassarea; total=glasscost+costframe+tax+labor; cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote