Question: This needs to be done in java. 1.Create a JFrame that will accept a Celsius temperature input and calculate and display the Fahrenheit value. 2.

This needs to be done in java.

1.Create a JFrame that will accept a Celsius temperature input and calculate and display the Fahrenheit value.

2. The formula to calculate Fahrenheit temperature is F = 9 * C / 5 + 32

3. Use exception handling t catch any exceptions that might be generated. For example if the user types ab and then enter, the contents of the TextField cannot be converted to a numeric value and an exception will be thrown. Output a message to the informing the user of the problem.

4.Verify that the program works when an exception is not thrown.

Note: An ActionListener will respond to the user pressing the Enter key. A KeyListener has its place to detect key events but is not a good choice for detecting the Enter key.

Questions.

1.What possible exceptions can be expected? _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

2.If you wanted the program to limit the number of times the user could give a bad input, what modifications would you need to make?

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!