Function: public static boolean equalVectors(Vector *
studentAnswer, Vector actualAnswer) *
*
Description: returns true if the data within the two vectors *
is equal *
ERROR_FLAG -
Static variable in interface org.problets.domain.state.Constants
Meant to be used by code which wants only the expression to be evaluated and not any associated Scope
Call Scope.preProcessFunctionCalls() before calling this, in order to handle embedded function calls
public static void explain(Vector condVector, Vector boundVector,
String operator, Vector explanation);
Generate an explanation for while an infinite loop is being
terminated
Textually explains the evaluation of the tree -
as opposed to graphical explanation by the view
Tries to round up all the errors while also explaining any correct expression
public void explainInitial(Vector explanation, Vector errors,
int lineNumber);
This function handles explaining any declarations,
initializations, or assignments in the for loop header
public void explainProcess(Vector explanation, OutputStream output, Vector errors)
This function generates the explanation of the code for the
student.
public void explainProcess(Vector explanation, Vector errors,
String occasion, int lineNumber);
This function generates the explanation of the code for the
student.
public void explainProcess(Vector explanation, Vector errors,
String occasion, int lineNumber);
This function generates the explanation of the code for the
student.
public void explainProcess(Vector explanation, Vector errors,
String occasion, int lineNumber);
This function generates the explanation of the code for the
student.
public int explainProcess( RunEnv runEnv, Behavior behavior, boolean stepFlag)
Extracts the cases from the caseVector and sends it to the explainProcess
of CaseModel so that CaseModel can explain the case.
For each step (e.g., print),
If the step has been properly set up, (e.g., pointer points to a var which is initialized)
Gives the full-fledged explanation
Else, (e.g., pointer is not yet assigned, is out of scope, not yet declared, etc.)
Gives an "Attempt was made" explanation
private String explainSkip(Vector condVector, Vector boundVector);
This function handles explaining any cases whereby the
condition or bounds skips across the other.
public void explainUpdate(Vector explanation, Vector errors,
int lineNumber);
This function handles explaining any update that occurs
in the for loop header
Constructor for expressions involving only literal constants in standalone expressions, OR
expressions created by getCode() method for printing purposes only (not evaluation)
Helps switch between demand and immediate feedback
Maintains the queue of panels to be displayed for feedback
Manages the appearance of the new Problem button
To enable properly highlighting the precedence of operators within parenthesis,
e.g., in (3 + 4) - (2 * 5), and enforcing that LHS of && and || are evaluated before RHS
ExpressionViewExpert
To hold the expression, evaluate it, provide its declarations,
to hold its view tree, provide list of operators and operands in it