On this page:
Readings
Supplemental Materials
Pre-lecture
Goals
In-class
Homework

Module 03

Last updated: Thu, 29 Jan 2015 12:52:15 -0500

Readings
Supplemental Materials
Pre-lecture
  1. Read the Readings and Supplemental Materials.

Goals
In-class

In-class exercise: Bouncing ball
Start with the moving ball program from the function implementation tutorial. Make the following modifications.
  • Use the following data definition for Ball:
    ; A Ball is a (make-ball Coordinate Velocity)
    ; INTERP: the coordinate is the ball center's x position
    ; and the velocity is in pixels/tick.
    How does it affect the code? Which functions are easier to implement and which functions are harder?

  • What if we defined a subset of Coordinate called BallXCoordinate to describe the first field of Ball. Design such a data definition and think about how it would change the program.

Homework

Problem Set 03