PLEASE USE JAVA Equivalence Class Software Testing Question: A function foo has k integers as input arguments, i.e., foo(int n1, int n2, …, int nk). Each argument may belong to a different equivalence class, which are stored in an Eq.txt file. In the file, the nth row describes the nth input. Take the second row for example. The data 1, 10; 11, 20; 21, 30 indicates that n2 has three equivalence classes separated by the semi-colons. There is an internal method “int check(int n)” that returns the equivalence class n is in. The result of check(n2 = 3) will be 1 and check(n2 = 25) will be 3. Regarding the function foo, it computes the sum of the returned values by the check function for all input arguments. Follow the Eq.txt file to automatically create test cases for Strong Normal Equivalence class testing. The input argument values are randomly generated. Store your prepared test cases to a test.txt file. Each test case comes with an expected output at the end. All values are delimited by a comma. ******************Eq.txt file******************** 1, 15; 16, 30 1, 10; 11, 20; 21, 30 1, 5; 6, 10; 11, 15 1, 3; 4, 6; 7, 9; 10, 12 1, 12; 13, 24 USE JAVA TO CODE THIS

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter15: Recursion
Section: Chapter Questions
Problem 8SA
icon
Related questions
Question

PLEASE USE JAVA

 

Equivalence Class Software Testing Question: A function foo has k integers as input arguments, i.e., foo(int n1, int n2, …, int nk). Each argument may belong to a different equivalence class, which are stored in an Eq.txt file. In the file, the nth row describes the nth input. Take the second row for example. The data 1, 10; 11, 20; 21, 30 indicates that n2 has three equivalence classes separated by the semi-colons. There is an internal method “int check(int n)” that returns the equivalence class n is in. The result of check(n2 = 3) will be 1 and check(n2 = 25) will be 3. Regarding the function foo, it computes the sum of the returned values by the check function for all input arguments. Follow the Eq.txt file to automatically create test cases for Strong Normal Equivalence class testing. The input argument values are randomly generated. Store your prepared test cases to a test.txt file. Each test case comes with an expected output at the end. All values are delimited by a comma.

******************Eq.txt file********************

1, 15; 16, 30

1, 10; 11, 20; 21, 30

1, 5; 6, 10; 11, 15

1, 3; 4, 6; 7, 9; 10, 12

1, 12; 13, 24

USE JAVA TO CODE THIS

Expert Solution
Step 1

Given

The answer is given below

 

Computer Science homework question answer, step 1, image 1Computer Science homework question answer, step 1, image 2

trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Knowledge Booster
Arrays
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning