Saved searches
Use saved searches to filter your results more quickly
Cancel Create saved search
Sign up Reseting focus
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Java PJ2 Lisp Expression Evaluator CSC220
Notifications You must be signed in to change notification settings
gequitz/LispExpressionEvaluator
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Go to file
Folders and files
Last commit message
Last commit date
Latest commit
History
View all files
Repository files navigation
LispExpressionEvaluator
CSC220 Programming Project#2
http://joeganley.com/code/jslisp.html (GUI)
- / must have at least one operand
- Implement the given MyStack class
- Design and implement an algorithm that uses MyStack class to evaluate a
- Valid tokens in an expression are '(',')','+','-','*','/',and positive integers (>=0)
- Display result as floting point number with at 2 decimal places
- Negative number is not a valid "input" operand, e.g. (+ -2 3)
- There may be any number of blank spaces, >= 0, in between tokens
(/(+20 30))
- Must use MyStack class in this project. (*** DO NOT USE Java API Stack class ***)
- Must throw LispExpressionException to indicate errors in LispExpressionEvaluator class
- Must not add new or modify existing data fields
- Must implement these methods in LispExpressionEvaluator class:
public LispExpressionEvaluator()
public LispExpressionEvaluator(String inputExpression)
public void reset(String inputExpression)
public double evaluate()
private void evaluateCurrentOperation()
- You may add new private methods