// Bryan Tokuda // Lab Section # 1 // www2.hawaii.edu/~btokuda/211/A1P2.htm import jan.*; public class A1P2 extends Biotope implements Executable { public static void main (String arguments []) {main ("A1P2", "mode=input,output");} public void initialize () { addDataLine ("5"); } public void execute () { int delta = readInteger(); // reads the increase each step int xCoord=0, yCoord=0; // initializes coordinates at 0,0 writeln("("+xCoord+","+yCoord+")"); // prints first set of coordinates for (int i=1; i<20; i=i+2) { // 10 loops, 2 steps per loop, forms 'L's xCoord=xCoord-i*delta; // moves x-coordinate by step # times delta writeln("("+xCoord+","+yCoord+")"); // prints coordinates yCoord=yCoord+(i+1)*delta; // moves y-coordinate by step # times delta writeln("("+xCoord+","+yCoord+")"); // prints coordinates delta=(-1)*delta; // turns 'L' around } } }