Java Programming Spring 2003 Homework #5

Java Calculator

Due Date: 3/29/2003 (by 11:59PM)
Electronic Submission Only!

Assignment

Java Calculator

Write a java program named Calculator (the main() should be in the class named Calculator. Your Calculator program must be a stand-alone GUI calculator (not an applet!). Your calculator must support addition, subtraction, multiplication and division. You can provide an integer based calculator (floating point is optional).

The user interface must include buttons that can be pressed using the mouse to enter numbers and operations, you do not need to support using the keyboard to enter numbers or operations.

Your calculator must allow the user to clear the display at any time.

Your calculator must allow the user to enter a number (by using the mouse to press the buttons), then an operator ('+', '-', ...) then another number followed by the '=' button. (The order is infix, not postfix (reverse polish)).

Included below is a screenshot of what is expected. Note that the sample shown below is an integer only calculator, feel free to create a floating point calculator or something that looks very different. The requirements are that your calculator must be functional and it's operation should be obvious.


How to submit

Submission of your homework is via email, the general idea is to send an email message with your files as attachments. There is an automated email submission system that will respond to your submission right away, so you will have a record that we got your files. For HW5 you should submit your .java files for the Calculator program. All files must be commented using the JavaDoc style comments (so that we can run javadoc on your code to extract information about your class(es)).

All projects must be submitted via email to javaprog-submit@cs.rpi.edu. The subject line of the submission message should contain a single number '5' indicating the HW number. The body of your message should include your full name (and anything else you want to tell us). Make sure your email message includes your full name, we can't record your grade unless we know your name (and the email address joe222@yahoo.com doesn't mean anything to us!).

Don't send compiled code (class files)!

You can expect a return email indicating receipt of your project submission immediately. This receipt will include a list of all the files that were successfully extracted by the submission script - please look over the receipt carefully to make sure your submission worked.

Multiple Submissions: You can resubmit up to 10 times for each project, we will always grade the last submission received unless you tell us otherwise.