|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjitas.core.StudentModel
public class StudentModel
The student model is a model of the student knowledge for a particular domain
Constructor Summary | |
---|---|
StudentModel(java.lang.String userName)
Constructor. |
|
StudentModel(java.lang.String userName,
java.util.Set<java.lang.String> solvedProblems,
java.util.SortedMap<java.lang.String,java.lang.String> problemsStatus)
Constructor. |
Method Summary | |
---|---|
void |
addSatisfiedConstraints(java.util.Collection<java.lang.String> satisfiedConstraints)
Adds the satisfied constraint to the collection of satisfied constraint names |
void |
addSolvedProblem(int problemID,
java.lang.String subdomainName)
Add a problem to the collection of solved problems. |
void |
addViolatedConstraints(java.util.Collection<java.lang.String> violatedConstraints)
Adds the violated constraint to the collection of violated constraint names |
void |
changedSubdomain(java.lang.String currentSubdomain)
Set current problem to problem one |
int |
compareTo(java.lang.Object object)
Standard compareTo override, based on the userName |
static StudentModel |
emptyModelFactory(java.lang.String username)
Returns a new empty model with just username set |
boolean |
equals(java.lang.Object object)
Standard equals override, based on the userName |
java.util.SortedMap<java.lang.String,java.lang.String> |
getAllProblemsStatus()
Get the map of problem status' |
int |
getCurrentProblemID()
Get the Problem the student is currently working on |
Problem |
getNextProblem(java.util.SortedMap<java.lang.Integer,Problem> problems,
int problemNumber)
Gets a problem with a given ID from a collection of problems |
Problem |
getNextProblem(java.util.SortedMap<java.lang.Integer,Problem> problems,
java.lang.String subdomainName)
Gets the next problem that hasn't yet been solved by the student from the set(map) of problems, based on id. |
java.lang.String |
getProblemStatus(java.lang.String subdomain,
int problemID)
Get the status for a problem. |
double |
getRating()
Get The ability rating of the student |
java.util.Collection<java.lang.String> |
getSatisfiedConstraints()
Get the collection of satisfied constraint names |
java.util.Set<java.lang.String> |
getSolvedProblems()
Get all solved problems |
java.util.Set<java.lang.Integer> |
getSolvedProblems(java.lang.String subdomainName)
Get all solved problems of a particular subdomain |
java.lang.String |
getUserName()
Get the userName of this user. |
java.util.Collection<java.lang.String> |
getViolatedConstraints()
Get the collection of violated constraint names |
int |
hashCode()
Standard hashCode override, based on the userName |
void |
incrementRating(double increment)
Increment the rating by some value |
void |
save(java.lang.String domainName)
Save this model to XML |
void |
setCurrentProblem(int currentProblemID)
Set the Problem the student is currently working on |
void |
setCurrentProblemStatus(java.lang.String subdomainName,
java.lang.String status)
Set the status of the current problem for a subdomain |
void |
setProblemStatus(java.lang.String subdomain,
int problemID,
java.lang.String status)
Set the status of a problem |
void |
setRating(double rating)
Set The ability rating of the student |
void |
setSatisfiedConstraints(java.util.Collection<java.lang.String> satisfiedConstraints)
Set the collection of satisfied constraint names |
void |
setViolatedConstraints(java.util.Collection<java.lang.String> violatedConstraints)
Set the collection of violated constraint names |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StudentModel(java.lang.String userName)
userName
- The students userName.public StudentModel(java.lang.String userName, java.util.Set<java.lang.String> solvedProblems, java.util.SortedMap<java.lang.String,java.lang.String> problemsStatus)
userName
- The students userName.solvedProblems
- A Map of solved problemsproblemsStatus
- A Map of problem status'Method Detail |
---|
public java.lang.String getUserName()
public int getCurrentProblemID()
public Problem getNextProblem(java.util.SortedMap<java.lang.Integer,Problem> problems, java.lang.String subdomainName)
public Problem getNextProblem(java.util.SortedMap<java.lang.Integer,Problem> problems, int problemNumber)
problems
- The problems to choose fromproblemNumber
- The ID of the wanted problem
public void addSolvedProblem(int problemID, java.lang.String subdomainName)
problemID
- The ID of the solved problemsubdomainName
- The subdomain namepublic java.util.Set<java.lang.String> getSolvedProblems()
public java.util.Set<java.lang.Integer> getSolvedProblems(java.lang.String subdomainName)
subdomainName
- The name of the subdomain
public static StudentModel emptyModelFactory(java.lang.String username)
username
- The username of the Student
public void setProblemStatus(java.lang.String subdomain, int problemID, java.lang.String status)
problemID
- The id of the problemstatus
- The status must be one of "solved", "attempted" or "not attempted"public java.lang.String getProblemStatus(java.lang.String subdomain, int problemID)
problemID
- The id of the problem
public java.util.SortedMap<java.lang.String,java.lang.String> getAllProblemsStatus()
public void changedSubdomain(java.lang.String currentSubdomain)
currentSubdomain
- public double getRating()
public void setRating(double rating)
public void setCurrentProblem(int currentProblemID)
currentProblemID
- The ID of the Problem the student wants to work onpublic java.util.Collection<java.lang.String> getViolatedConstraints()
public java.util.Collection<java.lang.String> getSatisfiedConstraints()
public void setViolatedConstraints(java.util.Collection<java.lang.String> violatedConstraints)
violatedConstraints
- The violated constraints namespublic void addViolatedConstraints(java.util.Collection<java.lang.String> violatedConstraints)
violatedConstraints
- The violated constraints namespublic void addSatisfiedConstraints(java.util.Collection<java.lang.String> satisfiedConstraints)
satisfiedConstraints
- The satisfied constraints namespublic void setSatisfiedConstraints(java.util.Collection<java.lang.String> satisfiedConstraints)
satisfiedConstraints
- The satisfied constraint namespublic boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int compareTo(java.lang.Object object) throws java.lang.ClassCastException
object
- the Object to be compared
java.lang.ClassCastException
public int hashCode()
hashCode
in class java.lang.Object
public void incrementRating(double increment)
increment
- The value to increase the rating bypublic void setCurrentProblemStatus(java.lang.String subdomainName, java.lang.String status)
subdomainName
- The subdomain namestatus
- The statuspublic void save(java.lang.String domainName)
domainName
- The name of the domain this model is for
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |