In the next development iteration, you are required to redesign formula cells in order
to allow the definition of more general mathematical expressions. Expressions
combine a number of operators (either unary or binary) with a number of operands
(either constant values or numeric cell values).
Example: [1,1] * (2 + [2,3]) - sqrt([4,4] + [4,5])
The following operators should be supported: +, -, *, /, sqrt (square root), exp
(exponent). Hint: employ the pattern “composite?? for representing mathematical
You are then required to design and implement all formula related functionality (i.e.
display and evaluate, described below) in SSE, in accordance with the design pattern
In other words, the evaluation of mathematical expressions should be implemented
using a specialized visitor class.
The display functionality for mathematical expressions stored in SSE spreadsheets
should produce the “preorder?? representation of arbitrary expressions, by “visiting??
their corresponding abstract syntax trees.
I will need the project done on 29 December 2009.