net.sourceforge.pavlov.user
Class QuizData

java.lang.Object
  extended by net.sourceforge.pavlov.user.QuizData

public class QuizData
extends Object

Data describing a single quiz on a single chapter.


Constructor Summary
QuizData()
          Creates a new QuizData instance with no answers and quiz starting right now.
 
Method Summary
 void addRight()
          Describe addRight method here.
 void addWrong()
          Describe addWrong method here.
 String getElapsedTimeString()
          From start of quiz to now, only makes sense for quiz in progress.
 double getPercentage()
          Describe getPercentage method here.
 int getRight()
          Describe getRight method here.
 Date getStart()
          Describe getStart method here.
 int getTotal()
          Describe getTotal method here.
 int getWrong()
          Describe getWrong method here.
 void setRight(int r)
          Describe setRight method here.
 void setStart(long when)
          Describe setStart method here.
 void setTotal(int r)
          Describe setTotal method here.
 void setWrong(int r)
          Describe setWrong method here.
 void toXML(Writer writer)
          Describe toXML method here.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuizData

public QuizData()
Creates a new QuizData instance with no answers and quiz starting right now.

Method Detail

setRight

public void setRight(int r)
Describe setRight method here.

Parameters:
r - an int value

setWrong

public void setWrong(int r)
Describe setWrong method here.

Parameters:
r - an int value

setTotal

public void setTotal(int r)
Describe setTotal method here.

Parameters:
r - an int value

setStart

public void setStart(long when)
Describe setStart method here.

Parameters:
when - a long value

addRight

public void addRight()
Describe addRight method here.


addWrong

public void addWrong()
Describe addWrong method here.


getPercentage

public double getPercentage()
Describe getPercentage method here.

Returns:
a double value

getRight

public int getRight()
Describe getRight method here.

Returns:
an int value

getTotal

public int getTotal()
Describe getTotal method here.

Returns:
an int value

getWrong

public int getWrong()
Describe getWrong method here.

Returns:
an int value

getStart

public Date getStart()
Describe getStart method here.

Returns:
a Date value

getElapsedTimeString

public String getElapsedTimeString()
From start of quiz to now, only makes sense for quiz in progress.

Returns:
a String value

toXML

public void toXML(Writer writer)
           throws IOException
Describe toXML method here.

Parameters:
writer - a java.io.Writer value
Throws:
IOException - if an error occurs