Java
UNIT CHALLENGES
CHALLENGE
public class AnimGFX { public static void main(String[] args) { NOOPDraw.createWindow(495,500,"Vertical Lines"); for(int x=20;
x<=460; x=x+10) { NOOPDraw.drawLine(x, 0, x, 460); } } The
program above creates the following line pattern: WORK HINT:
The FOR loop from the program above needs to be placed inside of a while
loop. Each pass in the while loop will
represent a single frame. |