subject

Answer questions (a) through (d) for the mutant in the two methods, findVal()
and sum().
(a) If possible, find a test input that does not reach the mutant.
(b) If possible, find a test input that satisfies reachability but not infection for
the mutant.
(c) If possible, find a test input that satisfies infection, but not propagation
for the mutant.
(d) If possible, find a test input that kills mutant m.

//Effects: If numbers null throw NullPointerException
// else return LAST occurrence of val in numbers[]
// If val not in numbers[] return -1
1. public static int findVal(int numbers[], int val)
2. {
3. int findVal = -1;
4.
5. for (int i=0; i 5’.// for (int i=(0+1); i 6.
if (numbers [i] == val)
7.
findVal = i;
8. return (findVal);
9. }

//Effects: If x null throw NullPointerException
// else return the sum of the values in x
1. public static int sum(int[] x)
2. {
3. int s = 0;
4. for (int i=0; i < x. length; i++) }
5. {
6.
s = s + x[i];
6’. // s = s - x[i]; //AOR
7. }
8. return s;
9. }

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
Draw the hierarchy chart and design the logic for a program that calculates service charges for hazel's housecleaning service. the program contains housekeeping, detail loop, and end-of-job modules. the main program declares any needed global variables and constants and calls the other modules. the housekeeping module displays a prompt for and accepts a customer's last name. while the user does not enter for the name, the detail loop accepts the number of bathrooms and the number of other rooms to be cleaned. the service charge is computed as $40 plus $15 for each bathroom and $10 for each of the other rooms. the detail loop also displays the service charge and then prompts the user for the next customer's name. the end-of-job module, which executes after the user enters the sentinel value for the name, displays a message that indicates the program is complete.
Answers: 2
question
Computers and Technology, 23.06.2019 13:30
Spoons are designed to be used for: spring hammering. applying body filler. identifying high and low spots. sanding highly formed areas.
Answers: 3
question
Computers and Technology, 25.06.2019 00:40
Roger ginde is developing a program in supply chain management certification for managers. ginde has listed a number of activities that must be completed before a training program of this nature could be conducted. the activities, immediate predecessors, and times appear in the accompanying table: activity immediate predecessor(s) time (days) a -− 44b -− 55 c -− 11 d b 1010 e a, d 55 f c 55 g e, f 1010 calculate the slack time. show the details.
Answers: 2
question
Computers and Technology, 25.06.2019 06:00
If an image has only 4 colors, how many bits are necessary to represent one pixel’s color?
Answers: 1
You know the right answer?
Answer questions (a) through (d) for the mutant in the two methods, findVal()
and sum().
Questions
question
Mathematics, 04.04.2020 04:03
question
Mathematics, 04.04.2020 04:04
question
Mathematics, 04.04.2020 04:04
Questions on the website: 13722367