Package util
Class Formulae
java.lang.Object
util.Formulae
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
private void
parseFormulae
(String formulae) void
setDescription
(String description) Sets the description of the Formulavoid
setFormula
(String expression) sets the formula or rather the expression( to the right of the equals sign ) to be equal to the parameter given below.void
setValidFormula
(boolean validFormula) void
setVariable
(String variable) sets the variable name to the given value.toString()
-
Field Details
-
expression
-
variable
-
validFormula
private boolean validFormula -
description
-
-
Constructor Details
-
Formulae
-
-
Method Details
-
getExpression
- Returns:
- the formula's expression i.e the quantity to the right of the equals sign.
-
setFormula
sets the formula or rather the expression( to the right of the equals sign ) to be equal to the parameter given below.- Parameters:
expression
- the formula itself i.e the quantity to the right of the equals sign.
-
getVariable
- Returns:
- the variable string that we set to be equal to the formula
-
setVariable
sets the variable name to the given value.- Parameters:
variable
- the dependent variable that the formulae after evaluation will store its value in.
-
isValidFormula
public boolean isValidFormula()- Returns:
- returns true if the software can model a valid Formula object from the user's input
-
setValidFormula
public void setValidFormula(boolean validFormula) - Parameters:
validFormula
- set this to true if the software can model a valid Formula object from the user's input
-
getDescription
- Returns:
- the description of the Formula
-
setDescription
Sets the description of the Formula- Parameters:
description
- the description of the Formulae
-
toString
-
parseFormulae
-