/** CelsiusToFahrenheit converts an input Celsius value to Fahrenheit. * output: the degrees Fahrenheit, a double */ public class CelsiusToFahrenheit5 { public static void main (String[] args) { TemperaturesWriter2 writer = new TemperaturesWriter2 (); DialogReader keyboard = new DialogReader (); int c = keyboard.readInt ("Degrees Celsius: "); writer.displayCelsius (c); double f = celsiusIntoFahrenheit (c); writer.displayFahrenheit ((int) f); } private static double celsiusIntoFahrenheit (double c) { return ((9.0/5.0) * c) + 32; } }