|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.problets.domain.template.Template
public class Template
Template To hold the template being used for the current problem Author: Amruth Kumar
Constructor Summary | |
---|---|
Template(int inTemplateNumber,
java.lang.String inAntecedent,
java.lang.String inIfCorrect,
java.lang.String inIfWrong,
java.lang.String inInstructions,
java.lang.String inTemplate,
java.lang.String inProblemType,
int inHardness)
Constructor currently used only for testing purposes in BatchTester - Retained for its ease of use |
|
Template(Template parameter)
Constructor used by TemplateWithContext class |
|
Template(java.util.Vector contentVector)
Constructor that extracts the template components from a vector of strings. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Method makes a deep copy of the template's various string members |
java.lang.String |
getAntecedent()
Returns the antecedent of the template |
java.lang.String |
getCompleteTemplate()
Returns the template including any optional declarations upfront |
static java.util.Vector |
getConjuncts(java.lang.String antecedent)
Returns a vector of all the conjuncts in an antecedent. |
static java.util.Vector |
getDisjuncts(java.lang.String antecedent)
Returns a vector of all the disjuncts in an antecedent. |
int |
getHardness()
Returns the hardness of this problem, i.e., the percentage of problems the students must have gotten correct on this particular topic before the student is not served this problem any more, e.g., 100 means the problem is always in play and 25 means if the student got even 25% of the problems correct so far, this template will not be used because it is too easy |
java.lang.String |
getIfCorrect()
Returns the learning objectives to be credited if the student answered the question correctly |
java.lang.String |
getIfWrong()
Returns the learning objectives to be credited if the student answered the question incorrectly |
java.lang.String |
getInstructions()
Returns any optional instructions provided for this problem |
java.lang.String |
getProblemType()
Returns the problem type: Code/Debug/Output |
java.lang.String |
getTemplate()
Returns the template string |
int |
getTemplateNumber()
Returns the template number of this template |
static void |
main(java.lang.String[] args)
|
static boolean |
match(java.lang.String lhs,
java.lang.String rhs)
Matches the left and right hand sides. |
static boolean |
matchConjuncts(java.lang.String antecedent,
java.lang.String learnObj)
Takes a dot-separated antecedent, and a Vector of string tokens. |
static boolean |
matchDisjuncts(java.lang.String antecedent,
java.lang.String learnObj)
Matches disjuncts NOT enclosed in braces: e.g., a,b,c not {a,b,c}. |
void |
print()
|
void |
setInstructions(java.lang.String inInstructions)
Sets the instructions for this Template object |
void |
setTemplate(java.lang.String inTemplate)
Sets the template string for this Template object |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Template(int inTemplateNumber, java.lang.String inAntecedent, java.lang.String inIfCorrect, java.lang.String inIfWrong, java.lang.String inInstructions, java.lang.String inTemplate, java.lang.String inProblemType, int inHardness)
public Template(Template parameter)
public Template(java.util.Vector contentVector)
Method Detail |
---|
public java.lang.Object clone()
clone
in class java.lang.Object
public int getTemplateNumber()
public java.lang.String getAntecedent()
public java.lang.String getTemplate()
public java.lang.String getCompleteTemplate()
public java.lang.String getIfCorrect()
public java.lang.String getIfWrong()
public java.lang.String getInstructions()
public java.lang.String getProblemType()
public int getHardness()
public static boolean match(java.lang.String lhs, java.lang.String rhs)
public static boolean matchDisjuncts(java.lang.String antecedent, java.lang.String learnObj)
public static boolean matchConjuncts(java.lang.String antecedent, java.lang.String learnObj)
public static java.util.Vector getDisjuncts(java.lang.String antecedent)
public static java.util.Vector getConjuncts(java.lang.String antecedent)
public void setInstructions(java.lang.String inInstructions)
public void setTemplate(java.lang.String inTemplate)
public void print()
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |