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

Answer:

Either, or both. This is a design decision.


Variables

Floating point would probably be best for a real application, but, to simplify things let us:

This work will by done by the convert() method. Here is a sketch of the code:

// The application
public int convert( int F )  
{
  return ( (F-32) * 5 ) / 9;
}

You could continue on from here and develop a non-GUI application that uses the command line window for input and output. You might do this to debug the application code before working on the GUI. However, this example does I/O with GUI components.


QUESTION 3:

Now give some thought to the graphical interface.