Calculator Shell in Java (the result of boredom in a programming lab)