COMPUTER SCIENCE Summer 2006
Unit 1, Lab04 Take the Field

  1. Create the file Lab04.java. This file uses the Athlete class already defined

  2. In public static void main(String[] args) { } create six Athletes using the default constructor. This puts all of the Athletes at 1,1 and facing NORTH.

    Class methods vs Instance methods:

  3. The new command defined on page One-16 is public static void takeTheField(Athlete athlete). This is not a new method defined inside class Athlete, so it is not called by maria.takeTheField(). This is a class method as oppossed to an instance method such as jumpRight(). The class method is specific to a particular lab.

    The correct call is:

  4. The specification, what you have to do, for the program is at the bottom of the page. Remember also to put in the coach.