// UTILITY CLASS // Frans Coenen // University of Liverpool // 19 April 2013 class Utility { /** Converts the given double to a two decimal place double. @param doubleNum the given double. @return the given double converted to a two decimal place double. */ public static double twoDecPlaces(double doubleNum) { int integerNum = (int) ((doubleNum+0.005)*100.0); double newDoubleNum = (double) integerNum/100.0; return(newDoubleNum); } }