Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Just need to get the coding for the console Create an interactive Windows Console (Chapter 2) or Windows Forms (Chapter 3) application that will be

image text in transcribedimage text in transcribedimage text in transcribed

Just need to get the coding for the console Create an interactive Windows Console (Chapter 2) or Windows Forms (Chapter 3) application that will be used for estimating the materials and labor costs for our carpet sales and installation company. Our calculations will be similar to those in the article found here https://www.improvenet.com/r/carpet-calculator To perform the calculation, you'll need to ask the user for some information about the room being carpeted These will be your inputs . Max width of the room (in feet). This value might be a floating point number. Use type double to represent . Max length of the room (in feet). This value might be a floating point number. Use type double to represent . Price (per sqare yard) of the carpet. This value might be a floating point number. Use type double to . Number of layers of padding to use. This value should be an integer, either 1 or 2. Use type int to represent it. it. represent it. it. We won't be able to validate this value yet but ask the user to enter either 1 layer or 2 layers First room? This value should be an integer, either O or 1. Use type int to represent it. 1 means this is the first room in the bid. O means this is one of the later rooms in the bid. Our company charges an extra $100.00 of labor for the first room in the job being bid. Remember to create a named constant instead of hard coding this price Carpet and padding are typically priced by the square YARD (not in square feet). Since our input for the size of the room is in feet, when you multiply the width and length to come up with area, it will be in square feet. Divide by 9 to get it in square yards, instead. Create a named constant for this conversion, too, Output the square yards needed with 1 digit of precision Once we know how many square yards are needed, we can calculate the materials costs. For carpet and padding, we include 10% extra in our estimates for waste. This will leave the client a little left over that can be used to make repairs later, for example. Calculate the cost of the carpet, including the excess. Be sure to create a named constant for the waste percentage. Calculate the cost of the padding, including the excess Our company charges the client $2.75 per square yard for each layer of padding. Remember to create a named constant instead of hard coding this price. Display the carpet cost and the padding cost (using currency formatting) For the labor costs, we include an extra $100.00 for the first room on the job. For the second room and later in a job being estimated, no extra fee is charged. Our company charges the client $4.50 in labor for every square yard of carpet that needs to be installed. The excess material is not included in the labor costs. Be sure to create a named constant instead of hard coding this price. Display the labor cost (using currency formatting). The total cost of the job will be sum of the costs of the carpet, padding, and labor. Display the total cost (using currency formatting). A version of the program as a Console application appears below. You can test your results using this data: Results should look like photo If you want to make the numbers align on the decimal point as in my example, you'll need to use field widths in additional to format codes when formatting. For example, the placeholder shown below applies currency formatting and output in a field width of 10 characters: (carpetCost,10:C) C:AWINDOWSlsystem321cmd.exe Welcome to the Ha :4 Prog1 Example Carpet Estimator Enter the max width of room (in feet): 20.5 the max length of room (in feet): 25. the carpet price (per sq. yard): 13.5 layers of padding to use (1 or 2): 1 Enter Enter Enter Is this the first room? (1 = YES, = NO): 1 Sq. Yards Needed: 56.9 $845.63 $172.26 $356.25 Carpet Cost: Padding Cost: LaborCost: Just need to get the coding for the console Create an interactive Windows Console (Chapter 2) or Windows Forms (Chapter 3) application that will be used for estimating the materials and labor costs for our carpet sales and installation company. Our calculations will be similar to those in the article found here https://www.improvenet.com/r/carpet-calculator To perform the calculation, you'll need to ask the user for some information about the room being carpeted These will be your inputs . Max width of the room (in feet). This value might be a floating point number. Use type double to represent . Max length of the room (in feet). This value might be a floating point number. Use type double to represent . Price (per sqare yard) of the carpet. This value might be a floating point number. Use type double to . Number of layers of padding to use. This value should be an integer, either 1 or 2. Use type int to represent it. it. represent it. it. We won't be able to validate this value yet but ask the user to enter either 1 layer or 2 layers First room? This value should be an integer, either O or 1. Use type int to represent it. 1 means this is the first room in the bid. O means this is one of the later rooms in the bid. Our company charges an extra $100.00 of labor for the first room in the job being bid. Remember to create a named constant instead of hard coding this price Carpet and padding are typically priced by the square YARD (not in square feet). Since our input for the size of the room is in feet, when you multiply the width and length to come up with area, it will be in square feet. Divide by 9 to get it in square yards, instead. Create a named constant for this conversion, too, Output the square yards needed with 1 digit of precision Once we know how many square yards are needed, we can calculate the materials costs. For carpet and padding, we include 10% extra in our estimates for waste. This will leave the client a little left over that can be used to make repairs later, for example. Calculate the cost of the carpet, including the excess. Be sure to create a named constant for the waste percentage. Calculate the cost of the padding, including the excess Our company charges the client $2.75 per square yard for each layer of padding. Remember to create a named constant instead of hard coding this price. Display the carpet cost and the padding cost (using currency formatting) For the labor costs, we include an extra $100.00 for the first room on the job. For the second room and later in a job being estimated, no extra fee is charged. Our company charges the client $4.50 in labor for every square yard of carpet that needs to be installed. The excess material is not included in the labor costs. Be sure to create a named constant instead of hard coding this price. Display the labor cost (using currency formatting). The total cost of the job will be sum of the costs of the carpet, padding, and labor. Display the total cost (using currency formatting). A version of the program as a Console application appears below. You can test your results using this data: Results should look like photo If you want to make the numbers align on the decimal point as in my example, you'll need to use field widths in additional to format codes when formatting. For example, the placeholder shown below applies currency formatting and output in a field width of 10 characters: (carpetCost,10:C) C:AWINDOWSlsystem321cmd.exe Welcome to the Ha :4 Prog1 Example Carpet Estimator Enter the max width of room (in feet): 20.5 the max length of room (in feet): 25. the carpet price (per sq. yard): 13.5 layers of padding to use (1 or 2): 1 Enter Enter Enter Is this the first room? (1 = YES, = NO): 1 Sq. Yards Needed: 56.9 $845.63 $172.26 $356.25 Carpet Cost: Padding Cost: LaborCost

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Heres a sample C console application to estimate carpet and installation costs csharp using System using SystemGlobalization class Program const doubl... 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

Genomes And Databases On The Internet A Practical Guide To Functions And Applications

Authors: Paul Rangel

1st Edition

189848631X, 978-1898486312

More Books

Students also viewed these Databases questions

Question

Define Administration?

Answered: 1 week ago

Question

2. What are your challenges in the creative process?

Answered: 1 week ago