/**************************************************
 * TempCalc for calculating Farenheit from Celcius
 * by Mark Rich
 * 2/8/2000
 *************************************************/

import javabook2.*;

class TempCalc {
    
    public static void main( String[] args) {
	
	// create the javabook objects
	MainWindow mw = new MainWindow();
	InputBox in = new InputBox(mw);
	OutputBox out = new OutputBox(mw);
	mw.show();
	out.show();

	// get the temp in celcius from the user
	int celcius = in.getInteger("What's the temperature" +
				    " in celcius?");

	// do the calculation
	double farenheit = (1.8 * celcius) + 32;

	// output the answer to the screen
	out.print("The temperature from celcius " + celcius);
	out.printLine(" in farenheit is " + farenheit);
    }
}
