JMU
logoArchetypes.png
ScoreCalculator


Introduction

Purpose:A utility class for calculating diving scores.

Details
The rawScore(String[]) Method:
This class must have a correct (i.e., consistent with the comments) implementation of the following static method:
    /**
     * 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)
    {

    }
  
The totalScore(String[], double) Method:
This class must have a correct (i.e., consistent with the comments) implementation of the following static method:
    /**
     * 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)
    {

    }
  
Other Methods:
This class may have other static methods.

Copyright 2013