|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.problets.domain.view.code.synthesis.SynthesisCodeSegment
public class SynthesisCodeSegment
Holds one segment of code: instructions to be displayed, correct code, template, and a stack that holds the student's attempts at answering the code segment
Constructor Summary | |
---|---|
SynthesisCodeSegment(java.lang.String synthesizedCode,
int inLineNumber,
DomainModel inSource)
|
Method Summary | |
---|---|
void |
addStudentAnswer(java.lang.String studentAnswer)
Add a new student attempt |
java.util.Vector |
getAllStudentAttempts()
Returns the list of all the previous attempts in the order they were attempted |
java.lang.String |
getInstructions()
Returns the instructions for this code segment |
java.lang.String |
getStudentAnswer()
Returns the latest student attempt |
CodeSegmentAttempt |
getStudentAttempt()
|
boolean |
hasAttempted()
Returns whether the student has attempted to answer |
boolean |
isAnswerCorrect()
Returns whether this answer is correct or not |
static void |
main(java.lang.String[] args)
|
void |
print()
|
void |
setCorrect()
Sets that this answer is correct |
void |
setIncorrect()
Sets this answer as incorrect |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SynthesisCodeSegment(java.lang.String synthesizedCode, int inLineNumber, DomainModel inSource)
synthesizedCode
- is of the format ^Instructions^Actual Code^Template^Method Detail |
---|
public java.util.Vector getAllStudentAttempts()
public java.lang.String getStudentAnswer()
public boolean hasAttempted()
public java.lang.String getInstructions()
public CodeSegmentAttempt getStudentAttempt()
public boolean isAnswerCorrect()
public void setCorrect()
public void setIncorrect()
public void addStudentAnswer(java.lang.String studentAnswer)
public void print()
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |