|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.problets.domain.model.expression.node.NodeView
org.problets.domain.model.expression.node.student.StudentNodeView
public class StudentNodeView
To hold intermediate nodes in the student's evaluation tree.
Field Summary | |
---|---|
static int |
DUMMY
|
Constructor Summary | |
---|---|
StudentNodeView(NodeView inOperator)
This constructor is called by BailedOutStudentNodeView when constructing the right hand side expression short circuited by the student. |
|
StudentNodeView(NodeView inOperator,
java.util.Vector inOperandsCovered,
int inLeftX,
int inRightX,
int inOrder)
The constructor called by ExpressionProblemView |
|
StudentNodeView(NodeView inOperator,
java.util.Vector inOperandsCovered,
int inLeftX,
int inRightX,
int inOrder,
boolean setupOperandsFlag)
The constructor called by BailedOutStudentNodeView |
Method Summary | |
---|---|
java.lang.String |
getExpression()
Returns a string representation of the expression after properly ordering the operands and operators |
NodeView |
getOriginalNodeView()
Returns the nodeView of which this StudentNodeView is a copy |
java.lang.String |
getValue()
Overrides the method defined in NodeView, so that it returns an empty string if value is null |
boolean |
isCovered(int leftCoord,
int rightCoord)
This method overrides NodeView.isCovered(). |
boolean |
isResultLocallyCorrect()
This method will evaluate the 1 operator, up to 2 operands subexpression selected by the student and find out whether the partial answer provided by the student is correct according to the subexpression chosen by the student. |
static void |
main(java.lang.String[] args)
|
void |
restoreAvailable(java.util.Vector operatorVector,
java.util.Vector operandVector)
Updates the operatorViewVector and operandViewVector based on which operators and operands were used for this node when this node is deleted from the student model |
int |
setNCheckSideEffects(java.util.Vector inSideEffectVector)
Records any side effects of this step, returns true if all are correct, and false otherwise. |
void |
updateAvailable(java.util.Vector operatorVector,
java.util.Vector operandVector)
Updates the operatorViewVector and operandViewVector based on which operators and operands were used for this node when this node is added to the student model. |
Methods inherited from class org.problets.domain.model.expression.node.NodeView |
---|
classifyNodes, clone, explain, getBackupLeftX, getBackupRightX, getContent, getContentWidth, getCopyIfExists, getFontMetrics, getLeftChild, getLeftMax, getLeftMin, getLeftX, getNode, getNodeView, getRightChild, getRightMax, getRightMin, getRightX, getSideEffects, paintExpression, print, setLeftChild, setRightChild, toString, typeset |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DUMMY
Constructor Detail |
---|
public StudentNodeView(NodeView inOperator, java.util.Vector inOperandsCovered, int inLeftX, int inRightX, int inOrder)
public StudentNodeView(NodeView inOperator, java.util.Vector inOperandsCovered, int inLeftX, int inRightX, int inOrder, boolean setupOperandsFlag)
public StudentNodeView(NodeView inOperator)
Method Detail |
---|
public java.lang.String getExpression()
public java.lang.String getValue()
getValue
in class NodeView
public boolean isCovered(int leftCoord, int rightCoord)
isCovered
in class NodeView
public NodeView getOriginalNodeView()
public void updateAvailable(java.util.Vector operatorVector, java.util.Vector operandVector)
public void restoreAvailable(java.util.Vector operatorVector, java.util.Vector operandVector)
public boolean isResultLocallyCorrect()
public int setNCheckSideEffects(java.util.Vector inSideEffectVector)
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |