|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object c12oop.simplequiz.lab.Simplequiz
public class Simplequiz
Simplequiz implements a list of quiz questions (only short-answer questions in this version).
Constructor Summary | |
---|---|
Simplequiz()
|
Method Summary | |
---|---|
boolean |
checkCurrentAnswer(java.lang.String answer)
Returns true if the given answer is correct for the current question. |
java.lang.String |
getCurrentAnswer()
Return the answer to the current question |
java.lang.String |
getCurrentQuestion()
Return the full specification for the current question. |
boolean |
hasNext()
Returns true if this quiz has another question. |
void |
next()
Advance to the next question. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Simplequiz() throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
public java.lang.String getCurrentQuestion()
public java.lang.String getCurrentAnswer()
public boolean checkCurrentAnswer(java.lang.String answer)
answer
- the user's answer
public boolean hasNext()
public void next() throws java.lang.Exception
java.lang.Exception
- if there are no more questions
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |