Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You will add several test cases as specified below. . i. public void testAdd) //invoke the add(double x, double y) method, use reasonable values .

image text in transcribed

You will add several test cases as specified below. . i. public void testAdd) //invoke the add(double x, double y) method, use reasonable values . public void testsubtract() //invoke the subtract (double X, double y) method 111, public void testModuus() //invoke the moduus(int x, int y) method iv. public void testMultiply() //choose meaningful numbers to test V. public void testDivide) //choose meaningful numbers to test V. public void testMultiplyForInfinity()//use Double. POSITIVE-INFINITY n the assert() // and Double.MAX_VALUE in the method call public void testDivideByZero() //use Double. POSITIVE-INFINTY in the assert(). /7 EPSILON in the assertO vii, V111. public void testDivideBySelf()//tests any number divided by itself. Should be equal to 1.0 ix. public void testSqrtPositive()//use EPSILON and use in the assert() X. public void testSqrtNegative)//use Double.NaN in the assert() .Each JUnit test case should have: A Calculator reference instantiated with an appropriate constructor (more to be said about this topic - the setup0 and teardown0 functions. i. 1. An appropriate "assert" statement. iii Invocations of methods from the Calculator class as needed. You will add several test cases as specified below. . i. public void testAdd) //invoke the add(double x, double y) method, use reasonable values . public void testsubtract() //invoke the subtract (double X, double y) method 111, public void testModuus() //invoke the moduus(int x, int y) method iv. public void testMultiply() //choose meaningful numbers to test V. public void testDivide) //choose meaningful numbers to test V. public void testMultiplyForInfinity()//use Double. POSITIVE-INFINITY n the assert() // and Double.MAX_VALUE in the method call public void testDivideByZero() //use Double. POSITIVE-INFINTY in the assert(). /7 EPSILON in the assertO vii, V111. public void testDivideBySelf()//tests any number divided by itself. Should be equal to 1.0 ix. public void testSqrtPositive()//use EPSILON and use in the assert() X. public void testSqrtNegative)//use Double.NaN in the assert() .Each JUnit test case should have: A Calculator reference instantiated with an appropriate constructor (more to be said about this topic - the setup0 and teardown0 functions. i. 1. An appropriate "assert" statement. iii Invocations of methods from the Calculator class as needed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beyond Big Data Using Social MDM To Drive Deep Customer Insight

Authors: Martin Oberhofer, Eberhard Hechler

1st Edition

0133509796, 9780133509793

More Books

Students also viewed these Databases questions