CS51 - Fall 2008 - Lecture 10
Active Objects
class that
extends ActiveObject
last line in constructor is
start()
the
run()
method specifies what the animation should do. Make sure there's a
pause
statement
Two versions of Pong
PatheticPong
PongPaddleBounded
how to get angles, bouncing off walls and paddle
passing court and paddle into the constructor for the ball
steady rate by using elapsed time
Lab3:
Boxball
Note that there are 3 classes, links to what will be in the starter file at the page above.
Design: think carefully about how parameters need to be used.
Working with images:
Snowman
Having multiple classes that extend ActiveObject:
FallingLeaves