Programming in Java - Homework 2

Instructor: Moorthy
CS-2220-01 Summer 1998
Due: June 1, 11:59:59 PM

The programs have to be written in Java 1.

  1. Write a temperature conversion program that converts from Fahrenheit to Celsius. The Fahrenheit temperature should be entered from the keyboard (via text field). A text field should be used to display the converted temperature. Formula: Celsius = 9/5* Fahrenheit + 32
  2. Enhance the above program by adding Kelvin Temperature scale. The program should also the user to make conversions between any two scales. Formula: Kelvin = Celsius + 273
2. Modify the calculator example given in calc to include the following features. You are not allowed to write new calculator program. You are not allowed to lift/copy code from the internet. The program that you write should be original.
  1. Include double types and operations on them.
  2. Add a new button st which takes the sqrt of the number.
  3. Add a new button ft which takes the factorial of an integer number.
  4. Add a new button c which clears the display and makes it go to 0.