and sum().
![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 24.04.2020 22:19 pdipti725
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](/tpl/images/cats/User.png)
Answers: 2
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
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](/tpl/images/cats/informatica.png)
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](/tpl/images/cats/informatica.png)
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](/tpl/images/cats/informatica.png)
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().
and sum().
Questions
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/es.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 25.09.2019 15:00
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 25.09.2019 15:00
![question](/tpl/images/cats/mat.png)
Mathematics, 25.09.2019 15:00
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/himiya.png)
![question](/tpl/images/cats/en.png)
English, 25.09.2019 15:00
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/istoriya.png)
History, 25.09.2019 15:00
![question](/tpl/images/cats/fizika.png)
Physics, 25.09.2019 15:00
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 25.09.2019 15:00
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/biologiya.png)
Biology, 25.09.2019 15:00
![question](/tpl/images/cats/himiya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 25.09.2019 15:00