Question: 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

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 landscaping and garden design company.

To perform the calculation, you'll need to ask the user for some information about the garden your customer wants. These will be your inputs:

  • Max width of the garden (in feet). This value might be a floating-point number. Use type double to represent it.
  • Max length of the garden (in feet). This value might be a floating-point number. Use type double to represent it.
  • Price (per square yard) of the soil. This value might be a floating-point number. Use type double to represent it.
  • Whether fertilizer and additional ground preparation is needed. This value should be an integer, either 0 or 1. Use type int to represent it. We won't be able to validate this value yet but ask the user to enter either 0 no fertilizer or 1 fertilizer.
  • First garden? This value should be an integer, either 0 or 1. Use type int to represent it. Our company charges an extra $50.00 of labor for the first garden ordered by every customer. Remember to create a named constant instead of hard coding this price.

Gardens and landscaping 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 an 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. Please do not use magic numbers. Using magic numbers might lead to some points deduction.

Once we know how many square yards are needed, we can calculate the materials costs. For the soil we use, we include 10% extra in our estimates for waste. This will leave the client a little leftover, which may be needed later. Calculate the cost of the soil, including the excess. Be sure to create a named constant for the waste percentage. The extra cost is only for soil, we DONT charge the client 10% extra on fertilizer. Calculate the cost of the fertilizer, without the excess. Our company charges the client $4.25 per square yard for fertilizer. Remember to create a named constant instead of hard coding this price. Display the soil cost and the fertilizer cost (using currency formatting).

For the labor costs, we include an extra $50.00 for the first garden on the job. For the second garden and later in a job being estimated, no extra fee is charged. Our company charges the client $3.25 in labor for every square yard of soil that needs to be laid. 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 soil, fertilizer, and labor. Display the total cost (using currency formatting).

PLEASE WRITE CODE IN C#.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!