Here is a function call trace for program Euclid on p259 of the textbook, run with command line arguments 4032 and 1272. I used the DrJava interaction pane to calculate 4032%1272, 1272%216, etc. main("4032", "1272") gcd(4032, 1272) gcd(1272, 216) gcd(216, 192) gcd(192, 24) gcd(24, 0) return 0 return 0 return 0 return 0 return 0 return This pattern gives a hint how to program a non-recursive implementation, using a loop. The idea is to assign parameters p, q to local variables x, y and code the loop so that it has the following loop trace: x y ----------- 4032 1272 1272 216 216 192 192 24 24 0 As an exercise, make a complete program with gcd implemented this way. The main program can take two numbers on the command line. Use your loop to calculate the gcd and then invoke Euclid.gcd to check whether your code got the right result. Better still, make you program read a series of pairs of integers from StdIn. For each pair, call your method to calculate the answer, compare it with the answer from Euclid.gcd, and just output "test ok" or "test failed" accordingly. The point is to get in the habit of thinking how to automate the testing of your programs.