Skip to main content

Timeline for Calculator with history

Current License: CC BY-SA 3.0

6 events
when toggle format what by license comment
Feb 15, 2017 at 17:01 comment added zhanymkanov thank you, Gemtastic! I really apreciate your advices and this guidance!
Feb 12, 2017 at 16:20 history edited Gemtastic CC BY-SA 3.0
added 134 characters in body
Feb 12, 2017 at 14:24 vote accept zhanymkanov
Feb 12, 2017 at 14:02 comment added Gemtastic Yes, I've merely reformatted OPs original code to show a more OOP approach to the existing code. There are many things to remark on and a lot of code should be re-organized and removed.
Feb 12, 2017 at 13:52 comment added Zeta That's a lot of duplicate code in your switch. I'd add private double addCalculationElement(double c) { calculations.addElement(c); return c; } and use return addCalculationElement(firstNumber + secondNumber) and so on in your switch. That way, you don't accidentally add a wrong value (e.g. a + b instead of a - b) to the calculations.
Feb 12, 2017 at 13:06 history answered Gemtastic CC BY-SA 3.0