Advertisement
Guest User

Untitled

a guest
Apr 28th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. public void addStudent(String studentName)
  2. {
  3. if (studentName != null)
  4. { int[] array = new int[NUM_QUIZZES];
  5. for (int i = 0; i < array.length; i++)
  6. {
  7. array[i] = MIN_GRADE;
  8. }
  9. quizMarks.put(formatName(studentName), array);
  10. }
  11. }
  12. > new student, marks set to 0
  13. /**
  14. * returns the quiz marks for a given student
  15. * @param student
  16. * @return the array of quiz marks for this student
  17. */ public int[] getQuizzes(String student)
  18. {
  19. int[] array = quizMarks.get(student);
  20. if (student != null)
  21. {
  22. for (int arrays : array)
  23. { System.out.println(arrays);
  24. }
  25. } return array;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement