Lesson A12 - Iterations |
|
|
ParallelLines Background: In this lab, you will practice using nested To do this efficiently, there are a few suggestions to consider. First, there are eight rows each containing seven filled boxes. This suggests a nested
Calculating the square position will take some work. You might want to make a quick sketch, with coordinates, to save frustration. Hint: there will be a negative x offset and a positive y offset to have the image start in the upper left corner as shown. The DrawingTool class includes a method for drawing filled rectangles:
For instance, with a Assignment:
|
|