|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--grading.TestPaper
Constructor Summary | |
TestPaper()
Creates a new instance of TestPaper |
|
TestPaper(java.lang.String nam)
Creates a new instance of TestPaper, given name |
|
TestPaper(java.lang.String nam,
int numAnsw)
Creates a new instance of TestPaper, given name, number of answers (answers are randomly generated) |
Method Summary | |
boolean |
checkNthAnswer(int n,
char answ)
Checks student's answer on Nth question angainst correct answer (answ) Should throw an exception if bad n |
boolean |
equals(java.lang.Object obj)
determines if two test papers are essentially the same - take tough stance here - name and all answers must be the same |
static char |
genRandAnsw()
Service method for generating a random multiple choice answer |
char[] |
getAnswers()
obtain whole array of student's answers |
java.lang.String |
getName()
report student name |
char |
getNthAnswer(int n)
reports students answer on the Nth question Should throw an exception if bad n |
int |
getNumAnswers()
report number of answers student has made |
int |
getNumCorrect()
report number of correct by student Assumes that Test Paper has already been checked |
int |
getNumIncorrect()
report number of incorrect by student Assumes that Test Paper has already been checked |
double |
getPctCorrect()
report pct correct by student Assumes that Test Paper has already been checked |
double |
gradeAll(char[] correctAnswers)
Grade student's answers against correct answers, including updating stats (number correct etc) |
static void |
main(java.lang.String[] args)
|
void |
setName(java.lang.String nam)
change student's name |
void |
setNthAnswer(int n,
char answ)
change student's Nth answer to given value |
java.lang.String |
toString()
obtain string representation for the test paper |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public TestPaper()
public TestPaper(java.lang.String nam)
public TestPaper(java.lang.String nam, int numAnsw)
Method Detail |
public static char genRandAnsw()
public java.lang.String getName()
public char getNthAnswer(int n)
public boolean checkNthAnswer(int n, char answ)
public int getNumAnswers()
public char[] getAnswers()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public void setName(java.lang.String nam)
public void setNthAnswer(int n, char answ)
public int getNumCorrect()
public int getNumIncorrect()
public double getPctCorrect()
public double gradeAll(char[] correctAnswers)
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |