
Purpose:A utility class for calculating diving scores.
/**
* Returns the raw score calculated from the individual judge's scores.
*
* If there are fewer than five judges, the raw score is just the mean
* of all of the judge's scores.
*
* Otherwise, the raw score is the mean after "throwing out" the high and
* low scores. (Note: Whether or not there are ties, exactly two scores
* are "thrown out".)
*
* This method is passed an array of String representations of
* double values. It can and should assume that all of the String
* objects correspond to valid double values.
*
* Note: This method (and any methods it uses) must NOT sort
* the array of scores (or any other array).
*
* @param data The String representations of the judge's scores
* @return The raw score
*/
public static double rawScore(String[] data)
{
}
/**
* Returns the total score (i.e., the raw score times the degree
* of difficulty) calculated from the individual judge's scores.
*
* This method is passed an array of String representations of
* double values. It can and should assume that all of the String
* objects correspond to valid double values.
*
* @param data The String representations of the judge's scores
* @param difficulty The degree of difficulty for the dive
* @return The raw score
*/
public static double totalScore(String[] data,
double difficulty)
{
}
Copyright 2013