1. A program’s function is to find the largest of three numbers. Devise white box test data for this section of program.
The code is:
int a, b, c;
int largest;
if (a >= b) {
if (a >= c) {
largest = a;
}
else {
largest = c;
if (b >= c) {
largest = b;
2. In a program to play the game of chess, the player specifies the destination for a move as a pair of integer indices, the row and column number. The program checks that the destination square is valid; that is, not outside the board. Devise white box test data to check that this part of the program is working correctly
The code for this part of the program is:
if ((row > 8) || (row <>
JOptionPane.showMessageDialog(null, "error");
if ((col > 8) || (col <>
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here