org.problets.domain.model.expression.node.operator.arithmetic
Class Division
java.lang.Object
org.problets.domain.model.DomainModel
org.problets.domain.model.expression.node.NodeModel
org.problets.domain.model.expression.node.operator.Operator
org.problets.domain.model.expression.node.operator.arithmetic.Arithmetic
org.problets.domain.model.expression.node.operator.arithmetic.Division
- All Implemented Interfaces:
- java.lang.Cloneable
public class Division
- extends Arithmetic
To represent division operator
- Author:
- Joshua Go, Amruth Kumar
Fields inherited from class org.problets.domain.model.DomainModel |
BOOLEAN, BREAKPOINT, CHARACTER, DOUBLE_PRECISION_REAL, ERROR_TYPE, EVAL_STATUS, expACTION, expASSIGNMENT, expAUTO_DEALLOCATION, expCALL, expCONDITION, expDECLARATION, expDEREFERENCING, expDYNAMIC_ALLOCATION, expDYNAMIC_ALLOCATION_INITIALIZATION, expDYNAMIC_DEALLOCATION, expELSE_CLAUSE, expERROR, expEXECUTION, expIF_CLAUSE, expINITIALIZATION, expINPUT, expPARAMETER_PASSING, expPRINT, expQUESTIONABLE, expREFERENCING, expRETURN, expRUNTIME_ERROR, expSEMANTIC_ERROR, expSYNTAX_ERROR, expUPDATE, IDENTITY, MAX_OBJECT_IDENTITY, MIN_OBJECT_IDENTITY, QUADRUPLE_PRECISION_REAL, RUNTIME_ERROR, SEMANTIC_ERROR, SIGNED_INTEGER, SIGNED_LONG, SIGNED_SHORT, SINGLE_PRECISION_REAL, SYNTAX_ERROR, UNDEFINED_TYPE, UNSIGNED_INTEGER, UNSIGNED_LONG, UNSIGNED_SHORT, WARNING |
Method Summary |
Value |
evaluate()
Checks that arithmetic operators are not applied to boolean operands in Java/C# |
void |
explain(java.util.Vector explanation,
java.util.Vector errors)
Textually explains the evaluation of the tree -
as opposed to graphical explanation by the view |
void |
getLocalLearningObjectives(java.util.Vector learnObjVector)
Overrides Arithmetic.getLocalLearningObjectives()
Accounts for Divide By Zero errors,
Correct answer being due to Integer or Real division, and Coercion. |
Methods inherited from class org.problets.domain.model.expression.node.operator.Operator |
clone, coerceToReal, contentEquals, contentEquals, getArity, getAssociativity, getOperatorType, getPrecedence, getStudentCopy, getSymbol, grade, locateOperator, main, recursiveContentEquals, recursiveSetValue |
Methods inherited from class org.problets.domain.model.expression.node.NodeModel |
classifyNodes, getContent, getLeftChild, getNonRecursiveContent, getOrder, getPosition, getRecursiveContent, getRightChild, getSideEffects, getValue, insertInOrder, setLeftChild, setOrder, setPosition, setRightChild, setValue, shortCircuit, skip, subExpToString, toString, valueEquals |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SYMBOL
public static final java.lang.String SYMBOL
- See Also:
- Constant Field Values
DIVIDE_BY_ZERO
public static final java.lang.String DIVIDE_BY_ZERO
- See Also:
- Constant Field Values
Division
public Division()
getLocalLearningObjectives
public void getLocalLearningObjectives(java.util.Vector learnObjVector)
- Overrides Arithmetic.getLocalLearningObjectives()
Accounts for Divide By Zero errors,
Correct answer being due to Integer or Real division, and Coercion.
- Overrides:
getLocalLearningObjectives
in class Arithmetic
evaluate
public Value evaluate()
- Description copied from class:
Arithmetic
- Checks that arithmetic operators are not applied to boolean operands in Java/C#
- Overrides:
evaluate
in class Arithmetic
explain
public void explain(java.util.Vector explanation,
java.util.Vector errors)
- Textually explains the evaluation of the tree -
as opposed to graphical explanation by the view
- Overrides:
explain
in class Arithmetic