Programming Assignment #5
Hints & Updates
invocation: mean = computeMean (grades, numGrades); // note no bracketsdefinition: public static double computeMean (double[] gradeArray, int n)
invocation: arrayDumper (yourArray, numGrades); // note no bracketsdefinition: public static void arrayDumper (double[] anyArray, int numElem) { // code to print an array of doubles int i; for (i = 0 ; i < numElem; i++) { System.out.printf("Array[%d]=%6.2f%n", i, anyArray[i]); } }
DecimalFormat df = new DecimalFormat("#0.0##"); //indicated 3 places after . txtStdDev.setText (df.format (number to format));