Challenge exercise In practice, you will probably find that Hacker T. Largebrain’s attempt to program the CalcEngine class is too full of errors to be worth trying to fix. Instead, write your own version of the class from scratch. The calculator-gui project contains classes that provide the GUI shown in Figure 7.6. You can use this project as the basis for your own implementation of the CalcEngine class. Be sure to document your class thoroughly and to create a thorough set of tests for your implementation so that your experience with Hacker’s code will not have to be repeated by your successor! Make sure to use dedicated unit test classes for your testing, instead of writing tests into standard classes; as you have seen, this makes asserting the correct results much easier.
Figure 7.6 The user interface of a software calculator
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.