Exercises

  1. 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 JText-Field). A JLabel should be used to display the converted temperature. Use the following formula for the conversion:

    Celsius=59×(Fahrenheit-32 )
  2. 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
  3. I.5 (Guess-the-Number Game) Write an app that ...

Get Android How to Program, 3/e now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.