送交者: 红雨 于 2005-2-11, 20:06:55:
I just got a follow up from a phone interview. Here is one of the question I need the answer no late than tomorrow. I really appreciate it if anyone can help.
Thanks a looooooot!!!!!
========================================
Design a class structure to represent binary expressions in memory, such as
"(1+2)*3". Implement the eval() method which will return the numeric value of
the constant expression. You can assume that someone else is doing the parsing
of the text representation: they will simply call your constructors to store the
parsed version.