Goals:
Preliminary Steps:
NOTE: If extracting using Windows “Extract All…”, the Assignment6 directory may be nested in an additional directory. Drag it to the root directory.
Instructions:
To complete the assignment, perform the following tasks (after reading the Instructions and Notes in their entirety):
○ The method signature:
○ See note 6 below for prohibited language constructs.
○ See note 6 below for prohibited language constructs.
○ See note 6 below for prohibited language constructs.
public static int defectMethod4(boolean a, boolean b, int c, int d, int e) {
int result = 0;
if (a == b) {
result = 1;
} else {
if ((c == 0) && ((d > 0) || (e < 0))) {
result = 2;
} else {
result = 3;
}
}
return result;
}
Create two JUnit test classes as follows, where each test case performs a single invocation of defectMethod4.
/*-
public static boolean defectMethod5(boolean a, boolean b) {
int x = 3;
int y = 1;
if(a) {
x += y;
} else {
y = y * x;
}
if(b) {
y -= x;
} else {
y -= 1;
}
return ((x / y) >= 0);
}
*/
Fill in your answers in the method, as follows:
Notes (important–make sure to read carefully):
Submission:
As soon as you submit, Gradescope will check your assignment by making sure that your files are present and in the correct location, compiling the code, running your tests, and performing some sanity checks on the outcome of such tests. If you pass all these checks, you will see a placeholder grade of 10 and a positive message from Gradescope. Otherwise, you will see a grade of 0 and an error message with some diagnostic information. Please note that a positive response from Gradescope only indicates that you passed the sanity checks and is meant to prevent a number of trivial errors. Please also note that if your submission does not pass the Gradescope checks, it will not be graded and will receive a 0, so please make sure to pay attention to the feedback you receive when you submit and keep in mind that you can resubmit as many times as you want before the deadline.[3]
[1] Using any of these constructs would result in a zero for that task.
[2] If using a Windows-based system, you may need to run java -cp “classes;lib/*” org.junit.platform.console.ConsoleLauncher –select-class edu.gatech.seclass.<test class name> instead.
[3] Although we tested the checker, it is possible that it might not handle correctly some corner cases. If you receive feedback that seems to be incorrect, please contact us on Ed Discussion.

![[SOLVED] Cs6300 assignment 6: white-box testing (individual assignment) fall2025](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip.jpg)

![[SOLVED] Build a Playlist using Single Linked List in C](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip-1200x1200.jpg)
Reviews
There are no reviews yet.