Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
I.3 (Temperature Conversion) Write a temperature-conversion app that converts from Fahrenheit to Celsius. The Fahrenheit temperature should be entered from the keyboard (via a JTextField). A JLabel should be used to display the converted temperature. Use the following formula for the conversion:
I.4 (Temperature-Conversion Modification) Enhance the temperature-conversion app of Exercise I.3 by adding the Kelvin temperature scale. The app should also allow the user to make conversions between any two scales. Use the following formula for the conversion between Kelvin and Celsius (in addition to the formula in Exercise I.3):
Kelvin = Celsius + 273.15
I.5 (Guess-the-Number Game) Write an app that plays “guess the number” as follows: Your app chooses the number to be guessed by selecting an integer at random in the range 1–1000. The app then displays the following in a label: