CS312 Lab 7: Developing a Physics Simulation


Due Monday, March 18, at 5:00 PM

Beginning with the code in lab7start.zip, add a hill which balls will bounce off of.

Add a new class called Hill, which inherits from Ball. It's like a ball, except that: Once your class is defined (which will mostly be a removal of functionality from Ball), add one to the list of objects in the window.

Note: There is a bug in the collision routine which sometimes causes balls traveling at low speed to "stick" to the hill. Don't be too concerned if this happens. If I update lab7start.zip with a fix for this bug, I'll try to remember to update this note as well.