Question: IN JAVA Please include the following 1. Block comments for each method 2. Line comments 3. Indentation 4. Proper naming 5. Methods 6. Output must

IN JAVA

Please include the following

1. Block comments for each method

2. Line comments

3. Indentation

4. Proper naming

5. Methods

6. Output must be the exact same as the provided output including all the spaces.

Problem: Write a program to convert meter to feet and feet to meter.

Your program must include the following methods:

1. Public static double footToMeter(double foot): This method converts the foot amount into meter and returns the result as a double.

2. Public static double meterToFoot(double meter): this method gets a double value representing meter and returns a double value representing the meter amount in feet.

3. Write a method that outputs the following by calling the methods in part 1 and part2. In this method you must use just one for loop. You also must use printf in order to format your output to just two decimal points.

4. Here is the formula for conversion: 1 foot is .305 meter.

Feet Meter Meter Feet

1 0.31 | 2 6.56 |

2 0.61 | 4 13.11 |

3 0.92 | 6 19.67 |

4 1.22 | 8 26.23 |

5 1.53 | 10 32.79 |

6 1.83 | 12 39.34 |

7 2.14 | 14 45.90 |

8 2.44 | 16 52.46 |

9 2.75 | 18 59.02 |

10 3.05 | 20 65.57 |

11 3.36 | 22 72.13 |

12 3.66 | 24 78.69 |

13 3.97 | 26 85.25 |

14 4.27 | 28 91.80 |

15 4.58 | 30 98.36 |

16 4.88 | 32 104.92 |

17 5.19 | 34 111.48 |

18 5.49 | 36 118.03 |

19 5.80 | 38 124.59 |

20 6.10 | 40 131.15 |

-------------------------------------------------

210 64.05 | 420 1377.05 |

5. Write the main method so that it calls the methods in the step 3

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!