import java.util.ArrayList; public class StudentAnswerSheet { private ArrayList answers; // the list of the student's answers private String name; public StudentAnswerSheet(String nm, ArrayList ans) { name = nm; answers = new ArrayList(); for (String a : ans) answers.add(a); } /** @param key the list of correct answers, represented as strings of length one * Precondition: key.size() is equal to the number of answers in this answer sheet * @return this student's test score */ public double getScore(ArrayList key) { // part A } /** @return the name of the student */ public String getName() { return name; } }