Question: 7.25 Gene's Green Part 9 - Full Program (Individual Assignment) Rules This is an Individual Assignment . You must complete this assignment on your own.

7.25 Gene's Green Part 9 - Full Program (Individual Assignment)

Rules

This is an Individual Assignment. You must complete this assignment on your own.

Do not collaborate or share code with other students.

Do not copy and paste code from anywhere.

Especially from Chegg or Course Hero, or Stack Overflow, or from anywhere you found through a Google Search

Students copying or sharing code will be reported to the Dean's office for violating the Academic Integrity Policy and for disciplinary action.

Before you make a serious mistake and risk your grade and enrollment at ASU, please see your instructor for help.

Do not use any resources outside of those provided in the course materials.

Do not use any language features that have not been covered to this point in the course materials.

Do not use any language features that are explicitly forbidden in these instructions.

If you get stuck or need help, please use the help systems provided in this course.

Copyright 2021 Arizona State University - This content is protected and may not be shared, uploaded, sold, or distributed in whole or part. Copying any part of these instructions or any part of a solution and sharing online or otherwise in any form is a violation of copyright laws and the ASU Academic Integrity Policy. All violations will be prosecuted.

Required Skills Inventory

Construct a program with multiple methods

Declare a variable

Instantiate an object

Use Scanner nextFloat or nextDouble method to collect user input

Output to console with System.out.println

Call a method from inside the body or another method

Use type casting to construct an expression

Use math methods to construct an expression

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 18 holes on the golf course, but Gene likes to keep things simple, 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.

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 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.

The Tee area is a circle with a diameter that is always one-third of the course width.

The Putting Green is a circle with a diameter that is always two-thirds of the course width.

The Sand Trap is a circle with a diameter that is always one-quarter of the course width.

The Sand Trap is always two foot deep.

Sand weighs 80 lbs. per cubic foot.

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 Trail. These two openings are both one yard wide.

Part 9 - Full Program

Design and construct a complete program for Gene's Green. Use the methods that you created in the previous Individual Assignments.

Additional Methods

You may also find it helpful to design and write some additional methods to do each of the following:

compute the total area of smooth sod, given the total length and width of a hole as arguments

the total area of smooth sod is equal to the area of the tee plus the area of the putting green

compute the total area of rough sod, given the total length and width of a hole as arguments

the total area of rough sod is equal to the total area of the hole (length times width) minus the areas of the tee, the putting green, and the sand trap

compute the total tons of sand needed, given the total length and width of a hole as arguments

to compute the tons of sand needed, you will need to compute the total square feet of the sand trap. With the total square feet, you can compute the total cubic feet of sand needed. From the total cubic feet of sand needed, you can compute the total pounds of sand needed. From the total pounds of sand needed, you can compute the tons of sand needed.

Each of the methods described in the list above could call one or more of the methods you already wrote (e.g. areaOfRectangle, areaOfCircle, etc.) as helper methods 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 methods 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 are some examples of what Gene should see when he runs your program.

Example 1

Enter Course Length : 20 Enter Course Width : 10 Total square yards of rough sod : 152 Total square yards of smooth sod : 44 Tons of sand : 4 Number of bushes : 58 

Example 2

Enter Course Length : 20 Enter Course Width : 20 Total square yards of rough sod : 206 Total square yards of smooth sod : 175 Tons of sand : 15 Number of bushes : 78 

Make sure that your program collects the two required inputs in this order:

Course length (yards)

Course width (yards)

Helpful Hints:

Make sure that your program outputs the amount of materials needed as four lines of text, formatted exactly as shown (including spelling, capitalization, spaces, and punctuation).

There are 2,000 pounds in a ton

There are 9 square feet in a square yard

Remember that when you divide an int by an int you will always get a truncated (rounded down) int

The Math.ceil method may be useful for rounding up.

// make any necessary imports here (for example, you will need a Scanner)

public class GenesGreen { public static void main(String[] args) { // declare and create your Scanner // prompt for and collect the required inputs

// call your methods to compute the required outputs

// display the results } // copy your method definitions from the previous parts here below // add any additional methods you may want here below below }

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!