Question: Consider the following example class. PrimeNumbers has three methods. The first, computePrime(), take one integer input and computes that many prime numbers. iterator() returns an
Consider the following example class. PrimeNumbers has three methods. The first, computePrime(), take one integer input and computes that many prime numbers. iterator() returns an Iterator that will iterate through the primes, and toString() returns a string representation.

computePrimes() has a fault that causes it not to include prime numbers whose last digit is 9 (for example, it omits 19, 29, 59, 79, 89, 109, ...). If possible, describe five tests. You can describe the tests as sequences of calls to the above methods, or briefly describe them in words. Note that the last two tests require the test oracle to be described.
(a) A test that does not reach the fault
(b) A test that reaches the fault, but does not infect
(c) A test that infects the state, but does not propagate
(d) A test that propagates, but does not reveal
(e) A test that reveals the fault
If a test cannot be created, explain why.
public class PrimeNumbers implements Iterable
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
