Previous Slide


Variable and History (again)

Next Slide

THE EFFECT OF PROGRAM INSTRUCTIONS CAN VARY AS THEY ARE EXECUTED REPEATEDLY BECAUSE THEY DEPEND ON THE VALUES OF VARIABLES AND PARAMETERS.

 int customer;

 public void mouseDown( ) {
    customer = customer + 1;
    pen.clearRect();
    pen.drawString("Next Customer = " + customer);
 }

  • SINCE VARIABLES CAN REMEMBER HISTORY, THEY PROVIDE A WAY TO GIVE COMMANDS THAT APPROXIMATE "DO THE NEXT ONE."
YOUR BROWSER DOES NOT SEEM TO KNOW ABOUT APPLETS

Applet Source code



The Web:
Technologies and
Techniques


Links to other course pages:


Williams College
Department of Computer Science
This page is part of a section of lecture slides related to " Animation and Repetition " within the topic "Iteration and Animation in Java". Other slides within this section and other sections of slides for the topic "Iteration and Animation in Java" can be accessed using the links below.
  • Animation and Repetition
  • Animation and Tedium
  • Computer Animation
  • Tedium and Computer Speed
  • Non-Repetitive Repetition
  • Variable and History (again)
  • Animations
  • The "animate" Method
  • Conditionals in Animations
  • Animating Motion
  • Motion Animations and Conditionals
  • Modifying Multiple "Physical" Parameters
  • Modifying Multiple Parameters (cont.)
  • double, double, toil and ...
  • loops
  • Repetition without "animate"
  • Java "Do" Loops
  • Java "Do" Loops (cont.)
  • A Fitting Reprise