For Exercises 15 through 28, use the incremental development methodology to implement the program. Design a visually appealing GUI with Swing components and layout managers. For each exercise, identify the program tasks, create a design document with class descriptions, and draw the program diagram. Map out the development steps at the start. Present any design alternatives and justify your selection. Be sure to perform adequate testing at the end of each development step.
Extend the calculator of Exercise 19 to allow the user to enter a number by using the keyboard. The class needs to implement the KeyListener interface and define the keyTyped method. You have to find information on KeyListener and KeyEvent from a Java API reference manual.
(Reference Exercise 19
(Challenge) Write a class that implements a calculator with the layout similar to this:
The user enters a number, using digit buttons only. Some of the issues you need to consider include
• How to determine whether the user is entering a left operand or a right operand.
• How to handle the entering of multiple decimal points. A typical calculator accepts the first decimal point and ignores the rest. For example, if you press 1 . 4 . 3 . , the number entered is 1.43.
• When the display is 0 and the user enters 0, the display will not change. However, if the display is nonzero and the user enters 0, the 0 is appended to the number currently displayed.
Study any real four-function calculator and try to implement a software calculator that simulates the real calculator as faithfully as possible, but feel free to make any reasonable changes.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.