Lab project

Display Listing 3.

Begin with the program named Alice0135b.

Create and add a new function belonging to the Coach object named getChicken.

Update the main method to that shown in Listing 3.

Listing 3. Updated main method for Alice135LabProjA.a2w.
  public void main ( ) {
    
       // Copyright 2007 R.G.Baldwin
  // Program demonstrates defining two new functions.
  doInOrder {
       print( ( Distance to chicken is: + ( ( coach.getDistanceToChicken ( ) ) .toString() ) ) );
  ( coach.getChicken ( ) ) .turn( RIGHT , 2 revolutions );
  }
  }