Lecture Videos
  1  public class TotalScore {
  2    /** Main method */
  3    public static void main(String[] args) {
  4      double[][][] scores = {
  5        {{7.5, 20.5}, {9.0, 22.5}, {15, 33.5}, {13, 21.5}, {15, 2.5}},
  6        {{4.5, 21.5}, {9.0, 22.5}, {15, 34.5}, {12, 20.5}, {14, 9.5}},
  7        {{6.5, 30.5}, {9.4, 10.5}, {11, 33.5}, {11, 23.5}, {10, 2.5}},
  8        {{6.5, 23.5}, {9.4, 32.5}, {13, 34.5}, {11, 20.5}, {16, 7.5}},
  9        {{8.5, 26.5}, {9.4, 52.5}, {13, 36.5}, {13, 24.5}, {16, 2.5}},
 10        {{9.5, 20.5}, {9.4, 42.5}, {13, 31.5}, {12, 20.5}, {16, 6.5}},
 11        {{1.5, 29.5}, {6.4, 22.5}, {14, 30.5}, {10, 30.5}, {16, 6.0}}};
 12                   
 13      // Calculate and display total score for each student
 14      for (int i = 0; i < scores.length; i++) {
 15        double totalScore = 0;
 16        for (int j = 0; j < scores[i].length; j++)
 17          for (int k = 0; k < scores[i][j].length; k++)
 18            totalScore += scores[i][j][k];
 19  
 20        System.out.println("Student " + i + "'s score is " +
 21          totalScore);
 22      }
 23    }
 24  }