JAVA PROGRAMM, PLEASE DO IT UNDERSTANDABLE AND CLEAR. I need an Algorithm and documentation on the program and the output
PLEASE MAKE A GOOD JAVA PROGRAMM.
Write a program that asks the user to enter a distance in meters. The program will then present the following menu of selection:
Convert to Kilometers
Convert to Inches
Convert to Feet
Quit the Program
The program will convert the distance to kilometers, inches or feet, depending on the user’s selection. Write the following methods:
getInput: This method prompts the user to enter a distance in meters. Returns input to the caller.
TestData: Cannot accept negative numbers.
Menu: This method does not accept any arguments, but returns a selection to the caller.
Convert2Kilometers: This method receives a parameter, converts to kilometers (meters * 0.001) and returns the value to the caller.
Convert2Inches: This method receives a parameter, converts to inches (meters * 39.37) and returns the value to the caller.
Convert2Feet: This method receives a parameter, converts to feet (meters * 3.281) and returns the value to the caller.
DisplayData: This method receives the input and the converted value.
Write a program that asks the user to enter a distance in meters. The program will then present the following menu of selection:
Convert to Kilometers
Convert to Inches
Convert to Feet
Quit the Program
The program will convert the distance to kilometers, inches or feet, depending on the user’s selection. Write the following methods:
getInput: This method prompts the user to enter a distance in meters. Returns input to the caller.
TestData: Cannot accept negative numbers.
Menu: This method does not accept any arguments, but returns a selection to the caller.
Convert2Kilometers: This method receives a parameter, converts to kilometers (meters * 0.001) and returns the value to the caller.
Convert2Inches: This method receives a parameter, converts to inches (meters * 39.37) and returns the value to the caller.
Convert2Feet: This method receives a parameter, converts to feet (meters * 3.281) and returns the value to the caller.
DisplayData: This method receives the input and the converted value.