Interface Equation
- All Known Implementing Classes:
- PostfixExpression
- public abstract interface Equation
This is an interface representing the implementing object is an equation.
Method Summary |
int |
solution()
Returns the solution for the equation. |
java.lang.String |
toString()
Returns a string representing the equation. |
solution
public int solution()
- Returns the solution for the equation. Currently only integer equations
are supported.
- Returns:
- the solution for the equation
toString
public java.lang.String toString()
- Returns a string representing the equation.
- Returns:
- string representing the equation being solved
- Overrides:
- toString in class java.lang.Object