Prepare calculator application - mock objects for testing

Assignment Help Programming Languages
Reference no: EM13189627

(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.

Reference no: EM13189627

Questions Cloud

Find the degrees of freedom for unequal variance test : A random sample of 20 items from the first population showed a mean of 100 and a standard deviation of 15. A sample of 16 items for the second population showed a mean of 94 and a standard deviation of 8.
Find the width of the window if the total area of square : A Norman window has the shape of a square with a semicircle mounted on it. Find the width of the window if the total area of the square and the semicircle is to be 200ft.
The amount of profit or loss per unit and in total : The best level of output for a monopolist in the short run is 500 units and is MR=MC. At this point Q=500, P= $11 and ATC= $8, so that the monopolist earns a profit of $3/per unit and a total profit of $1,500. Suppose that the AFC of the monopolis..
How far will an automobile travel in 6 hours : The distance in miles an automobile travels is given by the formula D = rt, where r is the rate in miles per hour and t is the time in hours. How far will an automobile travel in 6 hours at a rate of 55 miles per hour?
Prepare calculator application - mock objects for testing : 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.
What is the equilibrium price of lattes : Suppose that, on and near the U.C. Sunnydale campus, the weekly supply curve for lattes is given by the equation Q = max(1000 P - 2000, 0) : nobody makes any lattes unless the price is above $2/latte, and for each $1 the price is above $2 an extra..
Use the dual simplex method to solve the following lp : Use the dual simplex method to solve the following LP:
Formulate a linear program : Bamm Mining Company is currently extracting rock from two mines. Once it is taken from the ground and loaded on a truck, it is sent to one of two plants for processing.
What was the number of equivalent units of production : If Department H had 600 units, 60% completed, in process at the beginning of the period, 8,000 units were completed during the period, and 500 units were 30% completed at the end of the period,

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd