

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


CECS 174 Programming Assignment 10, Spring 2008, Todd Ebert
/** Class that models a Scantron. The Scantron will record quiz responses and have methods for computing a student’s score and determining if a quiz response is correct. @author Your Name public class Scantron
private String studentName; private char[] response;
@param numQuestions the number of questions on the quiz / public Scantron(String studentName, int numQuestions) { / implement */}
@return number of questions on the quiz / int numberOfQuestions() { / implement */ }
@param qNum question number (1-number of questions) @param answer answer to question qNum @return true if student response matches the answer / isCorrect(int qNum, char answer) { / implement */ }
/** @return the response (a letter a-d) to question qNum / public char getResponse(int qNum) { / implement */ }
/** Sets the response to the given question number / public void setResponse(int qNum, char resp) { / implement */ }
@return returns the name of the student / public String getStudent() { / implement */ }
/** Sets the name of the student / public void setName(String name) { / implement */ }
public int numberCorrect(char[] answer) { /* implement */ } }