Class AssessmentOptions

java.lang.Object
  |
  +--AssessmentOptions

public class AssessmentOptions
extends java.lang.Object

Accepts a student name and three results and formats and prints them. Input is assumed to be valid. Invalid input is not handled. Maximum of 50 student records, minimum of 2 student records allowed

Version:
Final 21-AUG-2003
Author:
Ned Martin

Constructor Summary
AssessmentOptions()
           
 
Method Summary
private static java.lang.String format(double number)
          Format a number.
static void main(java.lang.String[] args)
          Prints information about student results.
private static void parse(java.lang.String line, double[] totals, double[][] marks, java.lang.String[] students)
          Parse input.
private static void print(java.lang.String line, java.lang.String outputFile, boolean output, int overwrite)
          Prints data.
private static double stdDev(double[][] marks, double mean, int numStudents, int x)
          Calculates standard deviation Accepts numerical input and calculates standard deviation
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

AssessmentOptions

public AssessmentOptions()
Method Detail

main

public static void main(java.lang.String[] args)
Prints information about student results. Accepts input, formats appropriately and prints output
Parameters:
-i - String input file
-o - String output file
Returns:
None

stdDev

private static double stdDev(double[][] marks,
                             double mean,
                             int numStudents,
                             int x)
Calculates standard deviation Accepts numerical input and calculates standard deviation
Returns:
Double representing standard deviation of input values

format

private static java.lang.String format(double number)
Format a number. Accepts a double and returns a formatted string
Returns:
String representing formatted double

parse

private static void parse(java.lang.String line,
                          double[] totals,
                          double[][] marks,
                          java.lang.String[] students)
Parse input. Accepts input and parses input into various arrays
Returns:
None, however various arrays are altered by this function

print

private static void print(java.lang.String line,
                          java.lang.String outputFile,
                          boolean output,
                          int overwrite)
Prints data. Accepts input from main function and prints it accordingly
Returns:
None