CompSci 4 - Classwork 13 - Oct 20, 2011
10 pts

Today's classwork goes along with Chapter 7, Section 1, and also covers more on variables, showing you how to do timers and counters.

The following work needs to be checked off when you have completed it.

Download the ClickACow world from the web page. Your computer may save it as a zip file, be sure to rename it as a .a2w file.

  1. First run the world to see what it does. Look at the existing methods and functions.

  2. Add a counter to keep track of the number of times the cow will be clicked on.

  3. Add a timer with class variables and a method to initialize its class variables. The timer should start at 20 (Set the number lower while you are testing it out) and count down by 1 each time until it reaches 0. You should have an initialize method, similar to what you had for the counter. The cow should appear one time for each value in the timer.

  4. When the timer stops, the cow should stop and say a message. If the user reached or passed the target value, the user won; otherwise, the user lost.

If you finish early, feel free to embelish your animation.