Listing 2. Source code for the program named Alice0150b.

Alice0150b's Code

Created by: Dick Baldwin

world

Methods

  public void main ( ) {
    
       // Copyright 2007 R.G.Baldwin
  // The purpose of this program is to illustrate
  // the use of a new class named SpinningHare.a2c
  // During setup, use Import on the File menu
  // to add two objects of the SpinningHare class
  // to the world and rename them spinningHare1.
  // and spinningHare2.
  spinningHare1 .move( BACKWARD , 0.5 meters );
  spinningHare1.spin ( numberRevs = 5 , duration = 3 );
  spinningHare2.spin ( numberRevs = 10 , duration = 10 );
  spinningHare2 .move( BACKWARD , 0.5 meters );
  }