org.problets.domain.model.expression.node.student
Class ParenthesizedStudentNodeView
java.lang.Object
org.problets.domain.model.expression.node.NodeView
org.problets.domain.model.expression.node.student.StudentNodeView
org.problets.domain.model.expression.node.student.ParenthesizedStudentNodeView
- All Implemented Interfaces:
- java.lang.Cloneable
public class ParenthesizedStudentNodeView
- extends StudentNodeView
To hold intermediate node in the student's evaluation tree
that is a parenthesized subexpression - expect that the operatorsCovered
will contain the parenthesis and the root of the enclosed sub-expression.
- Author:
- Amruth Kumar
Constructor Summary |
ParenthesizedStudentNodeView(NodeView inOperator,
java.util.Vector inOperandsCovered,
int inLeftX,
int inRightX,
int inOrder)
This constructor is called by StudentNodeView when Parenthesis.isSeparateStep |
ParenthesizedStudentNodeView(ParenthesisView inOperator)
This constructor is called by BailedOutStudentNodeView when constructing
the right hand side expression short circuited by the student. |
Method Summary |
boolean |
isResultLocallyCorrect()
Called by ExpressionProblemView ONLY when Parenthesis.isSeparateStep. |
static void |
main(java.lang.String[] args)
|
void |
setCenter(NodeView inCenter)
Called by ParenthesisView.getCopyIfExists() when constructing
the subexpression what the student "bailed over" in Logical.BAILOUT mode |
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 |
ParenthesizedStudentNodeView
public ParenthesizedStudentNodeView(ParenthesisView inOperator)
- This constructor is called by BailedOutStudentNodeView when constructing
the right hand side expression short circuited by the student.
As such, it will use the leftX and rightX values of the original operator,
since the StudentNodeView is synthetically constructed rather than specified
by the student drawing an underbrace.
The operator being passed as a parameter is the root of the expression embedded
within the parenthesis.
ParenthesizedStudentNodeView
public ParenthesizedStudentNodeView(NodeView inOperator,
java.util.Vector inOperandsCovered,
int inLeftX,
int inRightX,
int inOrder)
- This constructor is called by StudentNodeView when Parenthesis.isSeparateStep
setCenter
public void setCenter(NodeView inCenter)
- Called by ParenthesisView.getCopyIfExists() when constructing
the subexpression what the student "bailed over" in Logical.BAILOUT mode
isResultLocallyCorrect
public boolean isResultLocallyCorrect()
- Called by ExpressionProblemView ONLY when Parenthesis.isSeparateStep.
Returns true if the value of the parenthesized expression is the same as the
only operand enclosed by the parenthesis and false otherwise
- Overrides:
isResultLocallyCorrect
in class StudentNodeView
main
public static void main(java.lang.String[] args)