I'm sure lots of people are doing something like this, but what the heck. The results of the tests are hardcoded, spitting out the answers at the correct times. Since the results it gives are independent of what you press, I simplified the interface by putting all the labels on the same button. Also, intermediate numbers appearing when you press buttons are not part of the specification, so you don't get them. There should be the answer only when you press '=' as you run through the test cases.