Package util

Class Formulae


  • public class Formulae
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Formulae​(java.lang.String expr)  
    • Method Summary

      Modifier and Type Method Description
      java.lang.String getDescription()  
      java.lang.String getExpression()  
      java.lang.String getVariable()  
      boolean isValidFormula()  
      void setDescription​(java.lang.String description)
      Sets the description of the Formula
      void setFormula​(java.lang.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​(java.lang.String variable)
      sets the variable name to the given value.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Formulae

        public Formulae​(java.lang.String expr)
    • Method Detail

      • getExpression

        public java.lang.String getExpression()
        Returns:
        the formula's expression i.e the quantity to the right of the equals sign.
      • setFormula

        public void setFormula​(java.lang.String expression)
        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

        public java.lang.String getVariable()
        Returns:
        the variable string that we set to be equal to the formula
      • setVariable

        public void setVariable​(java.lang.String variable)
        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

        public java.lang.String getDescription()
        Returns:
        the description of the Formula
      • setDescription

        public void setDescription​(java.lang.String description)
        Sets the description of the Formula
        Parameters:
        description - the description of the Formulae
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        Returns:
        the String representaion of the Formulae object