|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--TemperatureConversion
The TemperatureConversion Java application prints a table converting Celsius to Fahrenheit degrees.
Constructor Summary | |
TemperatureConversion()
|
Method Summary | |
static double |
celsiusToFahrenheit(double c)
Convert a temperature from Celsius degrees to Fahrenheit degrees. |
static void |
main(java.lang.String[] args)
The main method prints a Celsius to Fahrenheit conversion table. |
static void |
printNumber(double d,
int minimumWidth,
int fractionDigits)
Print a number to System.out, using a specified format. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TemperatureConversion()
Method Detail |
public static void main(java.lang.String[] args)
public static double celsiusToFahrenheit(double c)
c
- a temperature in Celsius degreesjava.lang.IllegalArgumentException
- Indicates that c is less than the smallest Celsius
temperature (-273.16).public static void printNumber(double d, int minimumWidth, int fractionDigits)
d
- the number to be printedminimumWidth
- the minimum number of characters in the entire outputfractionDigits
- the number of digits to print on the right side of the decimal pointjava.lang.IllegalArgumentException
- Indicates that fractionDigits is negative.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |