Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions

Question

=+executive director for the board to do its job in this area?

Answered: 1 week ago