Timeline for OO design of Reverse Polish Notation Calculator
Current License: CC BY-SA 3.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 22, 2017 at 14:56 | vote | accept | Angela P | ||
| May 19, 2017 at 21:48 | comment | added | Angela P | 200_success, I read your solution in the link where there is a static hashmap in the operator class, is this for decouple the calculator class from the operators? | |
| May 19, 2017 at 21:46 | comment | added | kraskevich | @AngelaPan Yes, it refers to the input String and the stack. | |
| May 19, 2017 at 21:33 | comment | added | 200_success | Definitely don't change it to public int calc(int a, int b). RPN operators should manipulate the stack directly. | |
| May 19, 2017 at 21:28 | comment | added | Angela P | thank you! I think HashMap is what I'm looking for! a follow-up question, when you say make all members non-static, you mean the static String input, stack and string operators, right?? (I'm new to OO design). any suggestions are much appreciated! | |
| May 19, 2017 at 21:15 | history | answered | kraskevich | CC BY-SA 3.0 |