Simple calculator written in java