Question: Give a set of four test cases for the algorithm of Exercise R5.11 that covers all branches. Data from Exercise R5.11 Each square on

Give a set of four test cases for the algorithm of Exercise •• R5.11 that covers all branches.

Data from Exercise R5.11

Each square on a chess board can be described by a letter and number, such as g5 in the example at right. The following pseudocode describes an algorithm that determines whether a square with a given letter and number is dark (black) or light (white).

If the letter is an a, c, e, org If the number

Using the procedure in Programming Tip 5.5 , trace this pseudocode with input g5.

If the letter is an a, c, e, org If the number is odd color="black" Else color="white" If the number is even color="black" color="white" Else Else 8 7 65+ 3 N 4 2 a b c d e f g h g5 a b c d e f g h 007 50 in ++ 32 5 1

Step by Step Solution

3.41 Rating (151 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Based on the provided algorithm for determining the color of a square on a chessboard well create a ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Java Programming Questions!