a the following diagram shows the classes used in


(a) The following diagram shows the classes used in a calculator application. This calculator application can do addition, multiplication, powers, logarithms, factorials and permutations. Some of these calculations can take a long time on the low-powered device on which it is designed to run. For this reason, the calculator takes each calculation it is asked to do and sends it over the internet to a supercomputer for computation as well as attempting to calculate it locally. If the supercomputer returns the result faster than the program can calculate it, it uses that result. Furthermore, the computer on which this application is running has a large amount of memory, so the application will store all the calculations it has already performed in a database. If it is asked to do a calculation it has done before, it uses the value it has stored in the database. This database can store 100,000 results before it is full and when it is full the calculator will have to do any new calculations every time they are requested.

471_Calculator application.png

At least the database class will need to be stubbed with mock objects for testing because you need to test for empty, partially full, and completely full databases. Which other classes do you think will need to be stubbed with mock objects for testing the application? For each class you identify explain why you think that class needs mocking and at least three di erent mocked behaviours you will need.

Request for Solution File

Ask an Expert for Answer!!
Application Programming: a the following diagram shows the classes used in
Reference No:- TGS0501455

Expected delivery within 24 Hours