public class TestAnswer extends Model
Modifier and Type | Field and Description |
---|---|
static String |
TYPE_FLOAT
Type float
|
static String |
TYPE_INT
Type integer
|
static String |
TYPE_MULTIPLE_CHOICE
Type multiple choice
|
static String |
TYPE_TEXT
Type text
|
static String |
TYPE_TRUE_FALSE
Type true/false
|
static String |
TYPE_UNIQUE_CHOICE
Type unique choice
|
static String |
VALUE_FALSE
False value
|
static String |
VALUE_TRUE
True value
|
Constructor and Description |
---|
TestAnswer(long id,
int ansInd,
int qstCod,
boolean correct,
String answer,
String feedback)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
int |
getAnsInd()
Gets the answer index inside the question
|
String |
getAnswer()
Gets answer text
|
boolean |
getCorrect()
Gets answer correct flag
|
String |
getFeedback()
Gets the text of the answer's feedback
|
Object |
getProperty(int param) |
int |
getPropertyCount() |
void |
getPropertyInfo(int param,
Hashtable arg1,
PropertyInfo propertyInfo) |
int |
getQstCod()
Gets question code
|
String |
getUserAnswer()
Gets the user answer
|
int |
hashCode() |
boolean |
isCorrectAnswered()
Checks if the user has answered correctly
|
void |
setAnsInd(int ansInd)
Sets the answer index inside the question
|
void |
setAnswer(String answer)
Sets answer text
|
void |
setCorrect(boolean correct)
Sets answer correct flag
|
void |
setCorrectAnswered(boolean correctAnswered)
Marks this answer as correctly or incorrectly answered by the user
|
void |
setFeedback(String feedback)
Sets the text of the answer's feedback
|
void |
setProperty(int param,
Object obj) |
void |
setQstCod(int qstCod)
Sets question code
|
void |
setUserAnswer(String userAnswer)
Sets user answer text
|
String |
toString() |
public static final String TYPE_INT
public static final String TYPE_FLOAT
public static final String TYPE_TRUE_FALSE
public static final String TYPE_UNIQUE_CHOICE
public static final String TYPE_MULTIPLE_CHOICE
public static final String TYPE_TEXT
public static final String VALUE_TRUE
public static final String VALUE_FALSE
public TestAnswer(long id, int ansInd, int qstCod, boolean correct, String answer, String feedback)
id
- Answer idansInd
- Answer index inside the questionqstCod
- Question codecorrect
- Flag to know if this is the correct answer of the questionanswer
- Answer's textfeedback
- Text of the answer's feedbackpublic boolean getCorrect()
public void setCorrect(boolean correct)
public String getAnswer()
public void setAnswer(String answer)
answer
- Answer textpublic int getQstCod()
public void setQstCod(int qstCod)
qstCod
- question codepublic String getUserAnswer()
public void setUserAnswer(String userAnswer)
userAnswer
- User answer textpublic boolean isCorrectAnswered()
public void setCorrectAnswered(boolean correctAnswered)
correctAnswered
- true if the user has answered correctly
false otherwisepublic int getAnsInd()
public void setAnsInd(int ansInd)
ansInd
- Answer index inside the questionpublic String getFeedback()
public void setFeedback(String feedback)
feedback
- Text of the answer's feedbackpublic Object getProperty(int param)
public int getPropertyCount()
public void getPropertyInfo(int param, Hashtable arg1, PropertyInfo propertyInfo)
public void setProperty(int param, Object obj)