Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void addStudent(String studentName)
- {
- if (studentName != null)
- { int[] array = new int[NUM_QUIZZES];
- for (int i = 0; i < array.length; i++)
- {
- array[i] = MIN_GRADE;
- }
- quizMarks.put(formatName(studentName), array);
- }
- }
- > new student, marks set to 0
- /**
- * returns the quiz marks for a given student
- * @param student
- * @return the array of quiz marks for this student
- */ public int[] getQuizzes(String student)
- {
- int[] array = quizMarks.get(student);
- if (student != null)
- {
- for (int arrays : array)
- { System.out.println(arrays);
- }
- } return array;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement