Develop a Calculator with a user interface that
is virtually identical to this, excluding the menu shown. Otherwise, your calculator should look like the one
shown, and support all the operations shown. Note: if you have questions about what various buttons do, this is the calculator that is available on all Windows machines. Model your class as shown below:
- A class representing the JCalculator. Here is a
start for this class. Note that the
JCalculator class extends JPanel, not JFrame.
- Implement event handling using an inner class.
- The buttons on the calculator must be
implemented as an array of JButtons.
- Test your Calculator class by compiling and
executing the following class. You may not
modify this class in any way.
Note: The three requirements below must be met to get any credit for this assignment.
- Your code must be formatted neatly. Eclipse can do this for you.
- Your code must follow the conventions described here.
- Add Javadoc comments to your code and generate the Javadoc file before submitting your assignment.
All the items above must be done to get any credit on the assignment.
Your assignment will be graded using the following
rubric:
- (30 points) User interface meets specifications.
That is, your calculator looks pretty much like the calculator
pictured. Note: I am concerned more about the layout of the buttons etc. than whether your buttons have rounded corners etc.
- (70 points) Code is functional. 3.5 points for
each of 20 functional elements.