Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Working with Input and Formatted Output in C++ You have decided to replace some of the carpet in your house. Having a limited budget, you

Working with Input and Formatted Output in C++ You have decided to replace some of the carpet in your house. Having a limited budget, you need to first estimate the cost for the various rooms. Instead of doing the calculations by hand, you have decided to put your C++ programming skills to good use and write a program to do the cost estimations. Your program will prompt the user for the needed information then display the calculated values in a neatly formatted report. Use the following information as specifications for your code. Include a heading for your output Prompt the user for the following information: o Name of the room to be carpeted o Length of the room in feet o Width of the room in feet o Price of the carpet per yard o Padding cost Square yardage for a room is calculated by dividing the total square feet by 9. Add 1 yard for any fractional differences. The labor cost of installing the carpet is $6.03/yard Tax rate is currently 5.7% Display the room name in addition to all the above values. 1. Using the parameters above, create a detailed flowchart or pseudocode outlining your program design. Some things to keep in mind while developing your solution: The majority of program development follows the steps of gathering input, perform calculations, then display output. Create a separate list of variables and their data types; variables can be added to the list as you continue developing your solution Start with the basic program flow and add specifics of the program as you further develop the solution 2. From your flowchart or pseudocode, translate each step into C++ code to develop your code. Keep the following points in mind when creating your program: Numeric values should be aligned and formatted to 2 decimal places. Make sure you are using the correct data types for all the values in your program Variable names should be descriptive Code should be indented and contain whitespace. All output should be well labeled. Add a comment to the top of your program that includes your name, the program name, and a description of the program code. Include detailed comments throughout your program. Test your output! Save the program as Carpet lastname.cpp (Windows users) or main.cpp (Mac users) Sample Program Execution Welcome to names carpet calculator! Enter the name of the room to be carpeted: bedroom Enter the length of the room in feet: 10 Enter the width of the room in feet: 10 Enter the price of the carpet per yard: 3.49 Enter the padding cost: 35 Carpet estimate for bedroom Total square feet of the room: 100 Total square yards of the room: 12 Total cost of the carpet needed: 41.88 Total cost of labor (at $6.03/yd): 72.36 Padding Cost: 35.00 Subtotal: 149.24 Tax: 8.50 Total: 157.74 3. After completing the assignment, attach your Carpet lastname.cpp or main.cpp file and flowchart/pseudocode to the Assessment link for grading.

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

Step: 3

blur-text-image

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

Contemporary Issues In Database Design And Information Systems Development

Authors: Keng Siau

1st Edition

1599042894, 978-1599042893

More Books

Students also viewed these Databases questions