Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 5 - areaofTee Method Write a public static method named areaofTee that takes one one argument ( a double ) and returns a value

Part 5- areaofTee Method
Write a public static method named areaofTee that takes one one argument (a double) and returns a value (double). The argument will be the width of a course hole (see diagram above). When called, this method should compute and return the totalTeeArea for a hole with a width given by the argument value (see the Other Details above). In the body of this method, call the areaofcircle method (that you wrote for a previous part of this project) to compute the totalTeeArea.
Examples
areaOfTee(3.0) should return the approximate value 0.79
areaOfTee(8.0) should return the approximate value 5.59
areaOfTee(7.5) should return the approximate value 4.91
Helpful Hints:
You may include and call any methods that you have defined for the previous parts of this challenge.
You may wish to write some additional code (in the main method) to test your method.
There should be no print (or println or printf) statements in your areaofTee method.
There should be no calls to any Scanner methods in your areaofTee method.
Remember that, in Java, when you divide and int by and int, the result will always be an int. For example (13) will evaluate to 0.
image text in transcribed

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

Students also viewed these Databases questions