Calculator written in Java