CS105      Lab 5 - Interactive Programming

Objectives:

  1. Before starting this lab you should have read Chapter 5 in your text.
     
  2. Start Alice and open the BiplaneAcrobat world from the textbook examples.
     
  3. You are going to implement an interactive program such that when the user types keys on the keyboard the plane will perform various actions.  Follow the instructions on pp141-145 to make the plane roll and fly forward when the space and up arrow keys are typed.
     


  4.  
    Assignment:
    Add flyLeft and flyRight event handling methods for the left and right arrow keys to steer the biplane left or right, and a forwardLoop stunt that is performed when the user presses the Enter key.


     


  5.  

    Assignment:
    Implement the Ninja motion as described on p161 #6.


     

  6. As we have seen in Chapter 4 we can generalize methods by using parameters.  Try the LightsOut example in which we can click on lights to make them turn off.  We will write ONE method with a parameter for which light will be turned off. Follow the instructions on pp 147-148 to achieve this.

     
  7. Assignment:
    Implement the Penguin Slide as described on p165 #13  You will want to add a circle from Shapes to act as the hole in the ice and set the color property to blue.

     

  8. Send your worlds to me in GoucherLearn.