Calculator written in java