Parameters and variablesTopMagnet Lab

The Magnet Lab

  1. We'll work on the Magnet lab next week
  2. Bring in design for part 1 to lab
  3. We'll look at it and give feedback, but not record a grade this week.

The goal of this week's lab is to practice designing classes and methods. You will be designing a Magnet class that can generate objects representing magnets that can be dragged around the screen. The lab handout describes the program in detail. However, we'd like to remind you of a few important points here.

  1. This week we ask that you to bring a "design" of the Magnet and MagnetGame classes to lab. You only need to provide a design for part 1 of the lab (though you should think about the rest as well). Your design should consist of the following for each class:
  2. We'll circulate through the lab at the beginning of the period checking the designs and giving comments on their completeness. You will not be graded on your design this week - we'll simply check that you have one.
  3. Your Magnet class will interact with the Pole class that we wrote. You must define the methods of Magnet exactly as we specify or Pole will not work.
  4. Note that you are not to change anything in the Pole class.

Parameters and variablesTopMagnet Lab