1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
public static int divideAndRound(int dividend, int divisor) {
if (divisor == 0) {
throw new IllegalArgumentException("Divisor cannot be zero.");
}
int result dividend / divisor;
if (result < 0) {
if (dividend % divisor != 0) {
result--;
}
} else if (result > 0) {
if (dividend % divisor != 0) {
result++;
}
}
return result;
19 }
Question 3 (4 points): You are assigned to do the functional (black-box) test for function Create the inspection decision
Close
+ 100%
Zoom