Neil Turner's Blog

Blogging about technology and randomness since 2002

A calculated act

Screenshot of my Java Calculator program I’m in a good mood since I’ve just finished a coursework assignment that didn’t need to be ready for another 12 days. Admittedly it was originally set a few weeks back and didn’t require a huge amount of work, but I feel really good having got it out of the way.
The assignment was to create a basic working calculator in Java Swing, which could do the basic adding, subtracting, multiplying and dividing, as well as being able to toggle between having a positive and negative number and allowing decimals. Probably the main reason why I feel so good about it is that the hard part – actually getting the calculator to work – was all done by me; I didn’t need to re-use code from anywhere else, other than a small bit from a textbook that I used for converting the number from negative to positive.
It’s pretty robust too – it won’t spew out a load of runtime errors if you try to divide something by 0, for example.
Of course, I still have two other courseworks that need doing, one of which is due in a week on Friday, and they’re going to be much more taxing. But at least the pressure is off with regards to this assignment, which is a good thing.

Comments are closed.