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, 22.06.2019 02:30
Larry sent an email to andy. andy didn't open larry's email but still understood what the message was. how did andy determine the message without opening the email?
Answers: 1
question
Computers and Technology, 22.06.2019 04:00
Acetylene is a gas which burns rapidly on its own, and is considered highly explosive. a) true b) false
Answers: 2
question
Computers and Technology, 23.06.2019 03:50
Iam a bacterium. i cause stomach cramps and diarrhea. i am caused by eating rotten foodssuch as chicken, fish, or eggs. sometimes turtles carry my bacteria.what am i?
Answers: 2
question
Computers and Technology, 23.06.2019 19:00
Acompany is hiring professionals for web designing. the firm is small with few resources. they want employees who possess problem-solving skills and can independently carry out responsibilities. which kind of employee should they select?
Answers: 2
You know the right answer?
Answer questions (a) through (d) for the mutant in the two methods, findVal()
and sum().
Questions
question
Mathematics, 25.09.2019 15:00
question
Mathematics, 25.09.2019 15:00
Questions on the website: 13722367