Returns a vector of references to all the leaf nodes in the knowledge model
Note: getDesiredLeafNodes() subsumes getAllLeafNodes() based on the values of
topic and concepts
Returns a vector of all the variables and anonymous variables
to which this pointer points over the course of a program
- Called by ActivationRecord.getAllPointees()
Returns the sequence of nodes clicked by the user in vector of
strings format.
getClone() -
Method in class org.problets.domain.model.expression.node.operand.VarOperand
Returns a clone of the variable that is this operand
for purposes of re-creating the current expression as student's attempted answer in StudentNodeView.
getClone() -
Method in interface org.problets.domain.model.expression.node.operator.assignment.Assignable
Returns a clone of the variable to which a value is being assigned
getClone() -
Method in class org.problets.domain.model.expression.node.operator.assignment.PrefixAssignment
If right is a VarOperand, get its varClone
Else, call getClone recursively on the right operand,
In either case, add getIncrement() to the value of the clone, and return it.
When a statement is used to represent a variable declaration in the condition of
a while, for, if, if-else or switch, since we need to post-process the code, i.e.,
add "while(", "for(", etc.
Method does arithmetic conversions so that the result is stored
in an object of the correct data type
Arithmetic conversions are defined as follows:
--If either operand is long double, result is long double.
Since VB returns an integer result if the denominator evenly divides the numerator
even though the two operands are real, we extend getCoercedValue() to handle this
Processes the text file whose name has been provided and returns a vector of
InputItem objects,
each object containing information about the type (see class constants), prompt, answering options and
mandatory nature of one question.
Processes the text file at the specified path and returns a vector of
InputItem objects,
each object containing information about the type (see class constants), prompt, answering options and
mandatory nature of one question.
If actualNodeView exists in availableViews, return a copy of it, else return null
actualNodeView is part of the actual answer, an OperatorView or OperandView object.
If actualNodeView exists in availableViews, return a copy of it, else return null
actualNodeView is part of the actual answer, an OperatorView or OperandView object.
If actualNodeView exists in availableViews, return a copy of it, else return null
actualNodeView is part of the actual answer, an OperatorView or OperandView object.
Returns all the variables that participate in this expression so that
they can be added as line objects for this line of code -
when variables are initialized, in conditions of if/if-else and loops
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
getHeader() -
Method in class org.problets.domain.model.control.selection.CaseModel
Returns the learning objectives in the antecedents of all the problems
in this test, and for each learning objective, the template numbers of
the problems that have the learning objective in their antecedent.
Overrides Arithmetic.getLocalLearningObjectives()
Accounts for Divide By Zero errors, Incorrect data type error,
and Correct answer learning objective.
Overrides Arithmetic.getLocalLearningObjectives()
Accounts for Divide By Zero errors,
Correct answer being due to Integer or Real division, and Coercion.
Overrides Operator.getLocalLearningObjectives()
Accounts for:
Incorrect data type error for Java/C#,
and Correct evaluation (Boolean/Other) for Not operator
Overrides Operator.getLocalLearningObjectives()
Accounts for:
Incorrect data type error for Java/C#,
Short Circuit evaluation (Boolean/Other),
and Correct evaluation (Boolean/Other) for both And and Or operators
Method adds all the local learning objectives (except precedence and associativity)
to the vector passed as parameter
The answer being correct is a learning objective applicable to ALL operators
public void getLoopValues(Vector condVarVector,
Vector condValueVector)
This function determines whether or not a condition
has left/right hand sides or not.
Given a token such as , returns the corresponding name,
after automatically determining the type of the token (variable/pointer/function/data type/random constant)
The old version of getNextToken() worked as follows:
Case 1: If the template started with <, it returned up to the matching >
Case 2: If the template did not start with <, it returned up to the next <
The problem was that in case 1, it returned '< ' and '<<'
In case 2, it returned all sorts of operators and literal constants combined, such as '+ 1){'
This version post-processes the result returned by the earlier version and returns the
next token, whether it is <, <<, +, literal constants, (, ), {, }, ; etc.
Method to extract the next statement - returns the String corresponding to all characters up to
and including the next semi-colon that is not part of a constraint.
Returns ROOT_PRESSED if the mouse has been pressed on a root,
NON_ROOT_PRESSED if the mouse was pressed on a node other than the root
and NO_NODE_PRESSED if the was mouse wasn't pressed on any node.
getOrder(), getResult() and equals() methods are being redefined here as a first step
towards not inheriting any data members from the base class -
For correct answer, order and result are already stored in NodeModel referred to by NodeView
For student answer, order and result are now stored in NodeModel referred to by StudentNodeView
Returns a reference to the pointer of given index by searching this
activation record, followed by activation records of ancestral scopes,
followed by the activation records of nested scopes
searchParents = false; searchChildren = false;
Only check this scope object for the variable
searchParents = false; searchChildren = true;
NOT LIKELY USAGE - except when the procedure calls itself recursively when the flags are true & true
searchParents = true; searchChildren = false;
Check this scope object, and all its ancestors
searchParents = true; searchChildren = true;
Check this scope object, its static parents and children - Used to create buggy code.
// Method to extract a complete scope template OR a call to a scope object
// from the masterTemplate
// Returns the index past the scopeTemplate in the masterTemplate
// Start from , Read argument list,
// If ; follows argument list, read it - and return the function call
// else, Read the body of the function and return the function definition
Client can call this method after reflectionView has returned FEEDBACK_COMPLETED
to find out the number of selections made and the order in which they were made
Returns the status of the problem sequencer, including the
number of problems that remain to be solved and the
number of concepts that remain to be learned, if applicable
Method returns a copy of this node with only shareable values,
i.e., content and position
resetting the others, i.e.,
left, right, value and order
- Method used by StudentNodeModel to
make a copy of the correct node for the student's answer
getStudentCopy() -
Method in class org.problets.domain.model.expression.node.operator.assignment.Assignment
Method returns a copy of this node with only shareable values,
resetting the others - Method used by StudentNodeModel to
make a copy of the correct node for the student's answer
Method returns a copy of this node with only shareable values,
resetting the others - Method used by StudentNodeModel to
make a copy of the correct node for the student's answer
Returns a vector of the learning objectives (strings, not KUs) yet to be met by the student
generated by comparing the student's KM against the correct KM saved in constructor
Returns the default data type - the returned value is reliable if the expression contains
at least one variable - the default type is taken to be that of the variable