Lecture 08: Connecting the Pieces
Ambient Temperature: 73.5oF
Concepts
- Pre-Game Show:
- Join the Hacker Games with your @rice.edu e-mail for a not-quite-normal computer contest.
- “The world is bigger than Microsoft, Amazon, and Google,” so consider interning or working for other companies, too.
- When the “is-a” relationship of inheritance truly exists, it is acceptable to have a concrete sub-class of a concrete class. However, do not forget to use abstract classes where appropriate, not just at the top of the class hierarchy, to factor out common code.
- Feel free to create ball types of your own imagination in Homework 2.
- Two approaches to (Model, View, Controller) design for Homework 2:
- The Model has a Timer which will use a Dispatcher to tell all of the Balls to update their positions. Every time the Model updates, it will use a Dispatcher provided to it by the Controller to tell the View the new information that the View should display.
- The Controller has a Timer which will tell the Model to update its state, and then tell the View to update what it shows. The Model will use its Dispatcher to tell all of its Balls to update. The View will use an Adapter provided by the Controller to get the information it needs from the Model.
- In all cases, when Buttons in the View are clicked, they will use Adapters provided by the Controller to communicate the necessary changes to the Model.
Quotes
- “I’ve been told: be careful about watching BallWorld after imbibing certain substances.” – Dr. Wong
- “You don’t put a fly method on a fish.” – Dr. Wong
Resources
- Dem Dry Bones: http://www.brownielocks.com/dembones.html
- Lecture webpage: http://www.clear.rice.edu/comp310/f12/lectures/lec08/