|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.pavlov.user.ChapterStatistics
public class ChapterStatistics
Statistics which describle all quizzes a user has taken in a given chapter.
Field Summary | |
---|---|
double |
frequency
Percentage of questions that have been answered. |
int |
nAnswered
Number of questions in the chapter that have been answered. |
int |
nOnceRights
Number of questions answered correctly at least once. |
int |
nOnlyWrongs
Number of questions answered only wrong. |
int |
nQuestions
Number of questions in the chapter. |
double |
onlyWrongsVersusNumberOfQuestions
Percentage of questions answered at least once, but with no correct answers divided by number of questions in the chapter. |
double |
rightsVersusNumberOfAnswers
Percentage of right answers. |
double |
rightsVersusNumberOfQuestions
Percentage of questions answered right at least once divided by number of questions in chapter. |
int |
totAnswers
Total number of answers. |
int |
totRights
Total number of right answers. |
Constructor Summary | |
---|---|
ChapterStatistics()
Creates a new ChapterStatistics instance. |
|
ChapterStatistics(int nQs,
int totAs,
int nAns,
int c,
int d,
int e)
Creates a new ChapterStatistics instance. |
Method Summary | |
---|---|
void |
addQuestionData(QuestionData qd)
Add a question to the ChapterStatistics. |
void |
addRight(QuestionData q)
Call when the question has been answered correctly. |
void |
addWrong(QuestionData q)
Call when the question has been answered incorrectly. |
ChapterStatistics |
deepCopy()
Uses a nifty trick from "Design Patterns in Java" to make a completely independent copy of this chapter. |
int |
getNumberNeverAnswered()
Number of questions in the chapter that the user has never answered. |
double |
getPercentageOfRightAnswers()
Number of right answers as percentage of number of total answers. |
double |
getPercentageOfWrongAnswers()
Number of wrong answers as percentage of number of total answers. |
double |
getPercentNeverAnswered()
Percentage of questions in the chapter that the user has never answered. |
double |
getPercentOfQuestionsAnsweredAtLeastOnce()
Percentage of questions in the chapter that have been answered at least once. |
double |
getPercentOfQuestionsAnsweredRightAtLeastOnce()
Percentage of questions that have been answered correctly at least once. |
double |
getPercentOfQuestionsOnlyAnsweredWrong()
Percentage of questions that have been answered at least once, but never correctly. |
int |
getTotalNumberOfWrongAnswers()
Number of wrong answers over all quizzes for this user on this chapter. |
void |
recalc()
Recalculares derived statistics from basic statistics. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int nQuestions
public int nAnswered
public int nOnceRights
public int nOnlyWrongs
public int totAnswers
public int totRights
public double rightsVersusNumberOfQuestions
public double onlyWrongsVersusNumberOfQuestions
public double rightsVersusNumberOfAnswers
public double frequency
Constructor Detail |
---|
public ChapterStatistics()
ChapterStatistics
instance.
public ChapterStatistics(int nQs, int totAs, int nAns, int c, int d, int e)
ChapterStatistics
instance.
nQs
- Number of questions.totAs
- Total number of answers.nAns
- Number of questions answered at least once.c
- Number of questions answered correctly at least once.d
- Total number of correct answers.e
- Number of questions answered only incorrectly.Method Detail |
---|
public double getPercentageOfRightAnswers()
double
valuepublic double getPercentageOfWrongAnswers()
double
valuepublic double getPercentOfQuestionsAnsweredAtLeastOnce()
double
valuepublic int getTotalNumberOfWrongAnswers()
int
valuepublic double getPercentOfQuestionsAnsweredRightAtLeastOnce()
double
valuepublic double getPercentOfQuestionsOnlyAnsweredWrong()
double
valuepublic int getNumberNeverAnswered()
int
valuepublic double getPercentNeverAnswered()
double
valuepublic void recalc()
public ChapterStatistics deepCopy()
ChapterStatistics
valuepublic void addRight(QuestionData q)
q
- a QuestionData
valuepublic void addWrong(QuestionData q)
q
- a QuestionData
valuepublic void addQuestionData(QuestionData qd)
qd
- a QuestionData
value
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |