public class TrivialExample2
extends java.lang.Object
The techniques in this example may be useful when several variables are used. See Trivial Example3 for an example using the getValueOf(var, value), setValueOf(var), and evaluate() methods. TrivialExample uses techniques suitable when only the "common" variables t, x, and y are used.
To evaluate prefix or postfix expressions, simply replace "buildFromInfix" by "buildFromPrefix" or "buildFromPostfix".
Requires:
ExprEvaluator.java
EasyFormat.java
DoubleScanner.java
| Constructor and Description |
|---|
TrivialExample2()
Constructor for TrivialExample2.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
main(java.lang.String[] args)
Trivial main program that starts the application.
|