Comp 101 Lab7: Lots of stuff running around the screen

Due Monday May 5th at 11:59pm.

Introduction:

Well here it is, the last lab of the semester. It's the time when all of you are busy working on projects in every class so this lab will be a little less code intensive than some of your others. It should help you become more confident in your skills as programmers.

Objectives:


Assignment Specifications

Expand your lab6 to have 5 of your complex shapes following one another  around the screen.


  1. In your DrawingPanel class, 
    1. change your complex shape instance variable to an ArrayList of Complex Shapes.
    2. change your Darawing Panel constructor to take an ArrayList of Complex shapes as a parameter
    3. in your paintComponent method change your _myShape.draw(g) call to a for-each loop which calls draw on each of the complex shapes in the new ArrayList of Complex Shapes instance variable. 
  2. In your Lab6 class
    1. replace the line which creates the complex shape with several lines of code
      1. first create an ArrayList of Complex shapes
      2. then in a loop add 5 new complex shapes to that array list (make sure that each shape starts at a different spot on the screen)
  3. In your ComplexShape class make sure that you have a constructor that takes two int parameters to specify the starting x and y positions on the screen
And thats all you need, now we've taken a simple lab and made a little more interesting

Submitting

Include a readme file with
Then zip up your lab6 directory and submit as usual. But!!! even though most of you will still be working in a folder called Lab6, make sure that the zip file that you submit has the word Lab7 in its name so I know when assignment this is.