Java Genesis
Hints for Chapter 6: Methods
Problem 1: converting Centigrade to Fahrenheit
The method cent2fah will
- be a public method;
- be a static (class) method;
- have return type double as the Fahrenheit temperature returned will be a floating
point number;
- have one parameter of type double denoting the Centigrade temperature we want
to convert.
With this in mind try constructing the method cent2fah before looking at the next hint.
Next Hint