Wednesday January 21, 2015, 13:00-13:30 Lab 02 Version B
/**
* This utility class converts kilos to pounds.
*
* @author Franck van Breugel
*/
public class KiloToPound
{
private KiloToPound() {}
/**
* Number of kilos per pound.
*/
public static final double KILO_PER_POUND = 0.45359237;
/**
* Converts the given number of kilos to the corresponding number of pounds.
*
* @param kilos the number of kilos.
* @pre. kilos >= 0 && kilos <= 1000.0
* @return the number of pounds corresponding to the given number of kilos.
*/
public static double convert(double kilos)
{
return kilos / KiloToPound.KILO_PER_POUND;
}
}