This assignment gives the student more practice using for loops.
| EXAMPLE: The student will create an applet like the one shown here. This activity provides the student with practice using for loops. |
| x |
ASSIGNMENT:
Here's a little sample to help the student get started on this
assignment:
public void strz1(Graphics g){
for(int c=10; c < d.width-10; c+=15){
x[0]=c; y[0]=c;
x[1]=c+3; y[1]=c+6;
x[2]=c+8; y[2]=c+6;
x[3]=c+4; y[3]=c+9;
x[4]=c+7; y[4]=c+15;
x[5]=c; y[5]=c+9;
x[6]=c-7; y[6]=c+15;
x[7]=c-4; y[7]=c+9;
x[8]=c-8; y[8]=c+6;
x[9]=c-3; y[9]=c+6;
g.fillPolygon(x,y,x.length);
}
}