public class TestAnswer extends Model
Modifier and Type | Field and Description |
---|---|
private int |
ansInd
Answer index;
|
private String |
answer
Answer's text
|
private boolean |
correct
Flag to know if this is the correct answer of the question
|
private boolean |
correctAnswered
Flag to know if the user has answered correctly
|
private String |
feedback
Answer's feedback
|
private static org.ksoap2.serialization.PropertyInfo |
PI_ansInd |
private static org.ksoap2.serialization.PropertyInfo |
PI_answer |
private static org.ksoap2.serialization.PropertyInfo |
PI_correct |
private static org.ksoap2.serialization.PropertyInfo |
PI_correctAnswered |
private static org.ksoap2.serialization.PropertyInfo |
PI_feedback |
private static org.ksoap2.serialization.PropertyInfo |
PI_id |
private static org.ksoap2.serialization.PropertyInfo[] |
PI_PROP_ARRAY |
private int |
qstCod
Question code;
|
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
|
private String |
userAnswer
User answer
|
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,
org.ksoap2.serialization.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() |
private int qstCod
private int ansInd
private boolean correct
private boolean correctAnswered
private String answer
private String feedback
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
private String userAnswer
private static final org.ksoap2.serialization.PropertyInfo PI_id
private static final org.ksoap2.serialization.PropertyInfo PI_correct
private static final org.ksoap2.serialization.PropertyInfo PI_correctAnswered
private static final org.ksoap2.serialization.PropertyInfo PI_answer
private static final org.ksoap2.serialization.PropertyInfo PI_ansInd
private static final org.ksoap2.serialization.PropertyInfo PI_feedback
private static org.ksoap2.serialization.PropertyInfo[] PI_PROP_ARRAY
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, org.ksoap2.serialization.PropertyInfo propertyInfo)
public void setProperty(int param, Object obj)