Consider The Following Code Snippet: A) Write The Test Cases Using Equivalence... Q#1: Consider the following code snippet: void merge(int arr[], int 1, int m, int r) intnl=m-1+1; intnR2=r -m; int L[nl1], R[n2]; for (int i = 0; i < nl; i+4) L[] = arr[1 + 1]; for (int j = 0; j < n2; j++) R[] = arr[m + 1 + j]; int j = 0; int k = 1; while (i < nl & j < n2) { if (L[]

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Question: Q#1: Consider The Following Code Snippet: A) Write The Test Cases Using Equivalence... Q#1: Consider the following code snippet: void merge(int arr[], int 1, int m, int r) intnl=m-1+1; intnR2=r -m; int L[nl1], R[n2]; for (int i = 0; i < nl; i+4) L[] = arr[1 + 1]; for (int j = 0; j < n2; j++) R[] = arr[m + 1 + j]; int j = 0; int k = 1; while (i < nl & j < n2) { if (L[]
Question: Q#1: Consider The
Following Code Snippet: A) Write
The Test Cases Using Equivalence...
Q#1: Consider the following code snippet:
void merge(int arr[], int 1, int m, int r)
{
int nl = m -1 + 1;
int n2 = r - m;
int L[n1], R[n2];
for (int i = 0; i < n1; i++)
L[i] = arr[1 + i];
for (int j = 0; j < n2; j++)
R[j] = arr[m + 1 + j];
int j = 0;
int k = 1;
while (i < n1 && j < n2) {
if (L[i] <= R[j]) {
arr[k] = L[i];
i++;
}
else {
arr[k] = R[j];
j++;
}
k++;
}
while (i < n1) {
arr[k] = L[i);
i++;
k++;
while (j < n2) {
arr[k] = R[j];
j++;
k++3;
}
}
a) Write the test cases using Equivalence Class
Portioning (ECP).
b) Generate mutants using relational operator
replacement, arithmetic operator replacement and
variable replacement operator.
c) Calculate the mutation score for the test case
generated using ECP.
Transcribed Image Text:Question: Q#1: Consider The Following Code Snippet: A) Write The Test Cases Using Equivalence... Q#1: Consider the following code snippet: void merge(int arr[], int 1, int m, int r) { int nl = m -1 + 1; int n2 = r - m; int L[n1], R[n2]; for (int i = 0; i < n1; i++) L[i] = arr[1 + i]; for (int j = 0; j < n2; j++) R[j] = arr[m + 1 + j]; int j = 0; int k = 1; while (i < n1 && j < n2) { if (L[i] <= R[j]) { arr[k] = L[i]; i++; } else { arr[k] = R[j]; j++; } k++; } while (i < n1) { arr[k] = L[i); i++; k++; while (j < n2) { arr[k] = R[j]; j++; k++3; } } a) Write the test cases using Equivalence Class Portioning (ECP). b) Generate mutants using relational operator replacement, arithmetic operator replacement and variable replacement operator. c) Calculate the mutation score for the test case generated using ECP.
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY