Listing 2. Source code for the program named Alice0135b.

Alice0135b's Code

Created by: Dick Baldwin

world

Methods

  public void main ( ) {
    
       // Copyright 2007 R.G.Baldwin
  // Program demonstrates defining a new function.
  doInOrder {
       print( ( Distance to chicken is: + ( ( coach.getDistanceToChicken ( ) ) .toString() ) ) );
  }
  }

coach

Functions

  java.lang.Number public Number getDistanceToChicken ( ) {
    
       // Get and return the distance to the chicken.
         return ( coach .distanceTo( Chicken ) ) ;
  }