Lecture 14: Command Dispatching

September 24, 2012

Ambient temperature: 73.2oF Concepts Dr. Wong is in a food coma from BBs Cafe, probably because today is his birthday. Never do ball.get_update_strategy().update();. That is an encapsulation violation! Instead, use ball.update_state(), and inside update_state(), the ball itself may ask its update strategy to update(). Or, the ball may implement its updating in an entirely different […]


Lecture 13: Command-Driven Dispatching

September 21, 2012

Ambient Temperature: 73.2oF Concepts Dr. Wong explains how proper MVC design facilitates launching ballworld as a Java Applet, by showing how the demo pages’ code was set up and invoked. Dr. Wong demonstrates “Infection Balls,” “Eating Balls,” and “Bouncing Balls” as part of the command-driven ballworld demo. Some pool halls have cue balls that are […]