go to previous page   go to home page   go to next page

Answer:

Boiling temperature is 212o Fahrenheit; 100o in Celsius.


Design of an Application

Let's design and implement a GUI application that converts a temperature expressed in Fahrenheit into Celsius. As usual, there are three parts to the design:

  1. The Graphical User Interface.
  2. Listener methods.
  3. Application methods.

Let us first look at the application methods. The formula for converting Fahrenheit into Celsius is this:

celsius = (fahrenheit - 32) * 5/9

This is algebra, not Java. Although the algebra looks much like Java, some design decisions are needed.


QUESTION 2:

Should you use integer variables or floating point variables to implement the formula?