|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectonlineTests.User
User
class represents the User in OnlineTests system. Stores
information about test results, id, questions
LoadDataModel
,
Utils
,
DBConnections
Field Summary | |
private java.lang.Integer |
id
ID represents user unique id, gotten from Users table of DataBase |
private int |
level
Represent difficulty level for this user. |
private boolean |
loginCorrect
Represents whether user is logged correct in this session |
private LoadDataModel |
model
LoadDataModel of this user for loading questions and updating user info |
int |
qNo
Represent current question number for this user. |
private java.util.Vector |
questions
Questions from DataBase. |
int |
score
Represent current session score for this user |
java.util.Vector |
userInfo
Represent user info, gotten from DataBase |
Constructor Summary | |
User()
Constructs an empty User. |
Method Summary | |
java.lang.Integer |
getID()
Gets id for the user. |
java.util.Vector |
getNextQuestion()
Gets next question for this user, according to current user level. |
void |
getQuestions()
Gets questions from DataBase. |
boolean |
isLoginCorrect()
Returns true is login is correct. |
void |
processAnswer(java.lang.String param)
Process the answer and refresh user score and level. |
void |
setID(java.lang.Integer ID)
Sets initial data for the user. |
void |
setLoginCorrect(boolean loginCorrect)
Sets correct login in the system. |
void |
updateInfo()
Updates user info in Users table in DataBase with new maximum score and new last score. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.lang.Integer id
private boolean loginCorrect
private java.util.Vector questions
public int score
private int level
public int qNo
public java.util.Vector userInfo
private LoadDataModel model
Constructor Detail |
public User()
Method Detail |
public void setID(java.lang.Integer ID)
ID
- The id of this userpublic java.lang.Integer getID()
public void setLoginCorrect(boolean loginCorrect)
loginCorrect
- booleanpublic boolean isLoginCorrect()
public void getQuestions()
public java.util.Vector getNextQuestion()
public void processAnswer(java.lang.String param)
param
- Shows if the answer is correct or not.public void updateInfo()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |