Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 3 . 1 Gene's Green ( Full Program ) Collaborative Challenge This is a Collaborative Challenge. You are strongly encouraged to work with a
Gene's Green Full Program Collaborative Challenge
This is a Collaborative Challenge. You are strongly encouraged to work with a partner, and to collaborate and work together with other students to solve this problem. Each student must submit their own copy of the solution.
Everything you need to know to solve this problem has been covered in the course materials prior to this challenge. Review those materials to refresh your memory and to find things you might have missed. Do not use any language or library features that have not been specifically covered in the prior course materials.
Problem Description and Given Info
Gene's Green Golf Center is remodeling their golf course, and has hired you to help write a program that will be used to determine what materials will be needed to complete the project. There are holes on the golf course, but Gene is not very creative, so every hole looks very similar. A typical Hole at Gene's Green Golf Center looks like the image below only the length and width change.
Golf Hole Diagram
Given the length and width of a hole in yards Gene needs to know the following:
Total square yards of rough sod, rounded up to the nearest square yard.
Total square yards of smooth sod, rounded up to the nearest square yard.
Tons of sand needed for the sand trap US tons rounded up to the nearest ton.
Number of bricks needed for the sand trap retaining wall, rounded up to the nearest brick.
Number of bushes needed, rounded down to the nearest bush.
The program should take, as inputs from the user, the length and the width of a hole both in yards The program should then perform all necessary calculations and produce a tidy report with all of the required information regarding materials needed to construct the hole.
Other Details
Gene will provide the length and width of the hole in yards. Your program should ask for this information in that order length followed by width Your program should expect a float for these quantities. These should be the only inputs to the program and the only inputs needed to generate the report.
The Tee area is a circle with a diameter that is always onequarter of the course width.
The Putting Green is a circle with a diameter that is always onehalf of the course width.
The Sand Trap is a circle with a diameter that is always onethird of the course width.
The Sand Trap is always one foot deep.
Sand weighs lbs per cubic foot.
The Brick Retaining Wall is always three bricks tall. The Retaining Wall covers onehalf of the circumference of the Sand Trap, and each brick is inches long.
The course is surrounded on all sides by Bushes. Gene wants to plant one bush for every yard of the course perimeter, leaving two openings one for the Entry Trail, and one for the Exit Trails. These two openings are both one yard wide.
Part Full Program
Design and construct a complete program for Gene's Green. Use the functions that you created in the previous challenges.
Additional Functions
You may also find it very helpful to design and write some additional functions to do each of the following:
compute the total area of smooth sod, given the total length and width of a hole as arguments
compute the total area of rough sod, given the total length and width of a hole as arguments
compute the total tons of sand needed, given the total length and width of a hole as arguments
compute the number or retaining wall bricks needed, given the total length and width of a hole as arguments
Each of the functions described in the list above could call one or more of the basic functions eg areaofrectangle, areaofcircle, etc. as a helper function to compute some needed values.
You will also need to implement the code necessary to collect and store the program inputs. Then you will need to implement the code that will call your functions to compute all the required program outputs. Finally, you will need to implement the code to print out a nicely formatted report with all of the information that Gene needs.
Here is an example of what Gene should see when he runs your program.
Enter Course Length :
Enter Course Width :
Total square yards of rough sod :
Total square yards of smooth sod :
Tons of sand :
Number of retaining wall bricks :
Number of bushes :
Make sure that your program collects the two required inputs in this order:
Course length yards
Course width yards Paython when you did that code the output was not correct Output differs. See highlights below.
Special character legend
Input
Your output ends with
ength yards: Enter Course Width yards: Total square yards of rough sod:
Total square yards of smooth sod:
Tons of sand:
Number of retaining wall bricks:
Number of bushes:
Expected output ends with
Total square yards of rough sod :
Total square yards of smooth sod :
Tons of sand :
Number of retaining wall
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started