public class Temperature { int temp; int high; int low; Temperature(int initialTemp) { temp = high = low = initialTemp; } public int getTemp() { return temp; } public int setTemp(int temp) { this.temp = temp; if (temp > high) high = temp; if (temp < low) temp = low; } public int getHigh() { return high; } public int getLow() { return low; } public void reset() { high = low = temp; } public int toCelcius(int f) { return (f - 32) * (5.0 / 9.0); } public String toString() { return ("" + temp + "degrees Fahrenheit"); } } Alternative: a static method can be called on the class, not requiring an instance... public static int toCelcius(int f) { // doesn't use instance variables return (f - 32) * (5.0 / 9.0); } example use: int boilingDegreesC = Temperature.toCelcius(212)