Question: Part 0 2 : Distance Conversion Method Description yardsToFeetAndInches ( double ) : String A public static method that when called and passed a distance

Part 02: Distance Conversion
Method Description
yardsToFeetAndInches(double) : String A public static method that when called and passed a distance value in yards will compute and return a String value with the equivalent distance in feet and inches.
Note:
A yard is 36 inches (a yard is also 3 feet)
A foot is 12 inches
A single quote mark is a common notation for a value specified in feet.
For example 3 feet is often expressed as 3'
A double quote mark is a common notation for a value specified in inches.
For example 7.5 inches is often expressed as 7.5"
You may need to cast or convert some values from one data type to another.
Remember that you can use `String.format` to construct a `String` value with a specified number of decimal places.
doDistConversion(Scanner) Partially provided in template and called by the menu, which provides a Scanner object. Remove the placeholder message.
Then implement the following functionality:
Prompt the user to enter a distance in yards
Collect and store the user input in a `double` variable
Call the `yardsToFeetAndInches` method, passing the user input as an argument
Store the value returned by the `yardsToFeetAndInches` method in another `String` variable
Display the equivalent feet and inches value as shown in the examples below
Here are some examples showing what the value returned by your `yardsToFeetAndInches` method should be for different argument values:
Example 1
Enter distance in Yards : 10.25
10.25 yards in Feet and Inches is : 30'9.00"
Example 2
Enter distance in Yards : 100
100.00 yards in Feet and Inches is : 300'0.00"
Example 3
Enter distance in Yards : 0
0.00 yards in Feet and Inches is : 0'0.00"

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!