ECLIPSE PROGRAM Write a program that preforms the following conversions: -feet t
ID: 3713810 • Letter: E
Question
ECLIPSE PROGRAM
Write a program that preforms the following conversions:
-feet to meters
-meters to feet
-Celsius to Fahrenheit
-Fahrenheit to Celsius
Include in your code the following methods:
main() : loops through:
? ask the user for their choice (call menu)
? switch on their choice and call the appropriate method to do the conversion.
until they choose to quit
menu() : a method that displays a menu with the above conversions, and also a quit option. Then gets a response from the user, being sure that their choice is one of the options, and if a char is either lower or upper case. It returns their choice.
4 conversion methods, one for each of the conversions above. Each of these will have their own local variables, and do their own input using the method getDouble() created in week 12.
Explanation / Answer
Hi Dear,
Please find my implementation.
Output:
1.feet to meters
2. meters to feet
3. Celsius to Fahrenheit
4. Fahrenheit to Celsius
1
Enter value:
45
Meters: 13.719512195121952
Do you want to continue(y/n):
n
Process finished with exit code 0
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.