Zebra0.com

alice variablesS Jointed Model as variable

S Jointed Model as variable

The jokester can be any of the animals.


Text of video

public void myFirstMethod() {
  //Programmer : Janet Joy
  //Gallery Class variables
  String joke = "What was the pumpkin’s favorite sport?";
  String answer = "Squash!";
  SJointedModel jokester = this.chicken;
  jokester.turnToFace( this.pumpkin );
  jokester.say( joke );
  // Pause before telling the punch line.
  this.delay( 2.0 );
  jokester.say( answer );
  this.pumpkin.think( "That's not funny." );
}

NEXT: Self Study Questions