Homework 6

1. Make the grasshopper program run as an applet. This will mostly involve changes to the Main class

2. Add an Image as a variable to the insect classes. Write a constructor that takes an Image as an argument and sets the Image variable equal to it. This constructor may take other arguments if you wish.

3. Determine a pixel size for each square on your grid (50 X 50 is good). Make a constant variable to represent this. Using loops, draw a 10 X 10 square board of lines spaced evenly apart (50 apart in the above example). Hont: in your loop, draw the lines from points determined by your index times the square size.

. Create a grasshopper and a cricket. Paint their picture in the square appropriate to their x,y value. Hint: do something similar as above. get the x,y for your bug and to determine placement on the grid, multiply by square size.