public class CodeResponse extends Question
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
afterCode
Information given by the student
|
private java.lang.String |
beforeCode
Given information from question
|
private java.lang.String |
expectedOutput
Answer to be compared to
|
Constructor and Description |
---|
CodeResponse()
Constructor of CodeResponse class
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getExpectOutput()
Gets the expected answer of the question
|
java.lang.String |
runProgram()
Combines user submitted text and before/after text to form complete programming question.
|
void |
setAfterCode(java.lang.String text)
Sets code provided in question after the student answer.
|
void |
setBeforeCode(java.lang.String text)
Sets code provided in question prior to student answer.
|
void |
setExpectedOutput(java.lang.String text)
Sets the expected answer for the question
|
getCourse, getDiagramPath, getDifficulty, getKeyword, getQuestionText, getTime, setCourse, setDiagramPath, setDifficulty, setKeyword, setQuestionText, setTime
private java.lang.String expectedOutput
private java.lang.String beforeCode
private java.lang.String afterCode
public java.lang.String getExpectOutput()
public void setExpectedOutput(java.lang.String text)
text
- The String provided by the user to be the answer to the test question.public void setBeforeCode(java.lang.String text)
text
- The String provided by the Instructor.public void setAfterCode(java.lang.String text)
text
- The String provided by the Instructor.public java.lang.String runProgram()