Question: This program is for Java, we use IntelliJ. Your task is to write an interactive temperature converter that converts between Celsius to Fahrenheit and vice

This program is for Java, we use IntelliJ. Your task is to write an interactive temperature converter that converts between Celsius to Fahrenheit and vice versa. Your program should be interactive and allow multiple conversions per session.

Here is a sample test run of what we are looking for;

Sample Test Run:

Temperature Converter: ======================= Choose Action: F to C (f), C to F (c), Quit(q): f Enter temperature to convert: 212 212.00 F = 100.00 C Choose Action: F to C (f), C to F (c), Quit(q): c Enter temperature to convert: 100 100.00 C = 212.00 F Choose Action: F to C (f), C to F (c), Quit(q): f Enter temperature to convert: 32 32.00 F = 0.00 C Choose Action: F to C (f), C to F (c), Quit(q): c Enter temperature to convert: 0 0.00 C = 32.00 F Choose Action: F to C (f), C to F (c), Quit(q): q Goodbye.

Requirements:

Your program should prompt the user for the type of conversion and the temperature to be converted.

You should validate input and print error messages for invalid input.

Use Scanner to retrieve user input. Do your conversions in a loop, (do-while will work), to allow multiple conversions per session. Your loop should have a stopping condition to quit.

Your numeric output should be formatted to at least one-point precision, but no more than 2 points. Suggestion: use String.format for formatting your numeric expressions. See Unit 2.

Your scanner should allow upper case or lower case (.e.g. convert to lower case).

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!