Boxball game assignment and resources - Spring 2003


  • Friday, October 4th Lecture notes and BoxBall Lab 5 assignment. CHAPTER 5: Read and study carefully chapter 5 of the Williams College textbook as you study these lecture notes.

  • Lab #5 assignment to play the simple game of dropping a ball into a box from a certain height. Note that you must do a DESIGN OF YOUR CLASSES FIRST!

  • Download the lab_5.gpj that has RELATIVE file references. You would need to fix the other lab_5.gpj project file, as it was accidently saved with absolute file references to Box.java, Ball.java, Boxball.java and objectdraw.jar files.

  • See the Boxball game phase #1 demonstration, with helpful hints and directions for getting more than halfway through the project.

  • See the completed Boxball game, with a few extra features added.

  • Class #18 review: Summary of and examples from the Monday, October 7th class and lecture.

  • Boxball game Helpful Hints email #1 of 2.

  • Boxball game Helpful Hints email #2 of 2. Also EXAM ONE being Wednesday, October 16th.

  • Class #19 preview: Raindrops keep filling up the collector and falling on my head.

    Example helpful for understanding the public onBallHittingBottom() method techniques and issues for your Boxball class, and how the Ball class could call it. Hopefully, this will be clear after you study THIS example. Look at this ahead of time. Review of class #18 and chapter 5 is useful too, as this is a development of the DropCollector and the FallingBall classes from pages 156-157 of the book.

  • Here is an example that uses a dialog box to gather input from the user, then uses standard String processing and while loop techniques to print your favorite movie in a triangular pattern, using the Courier New font.

  • See a Boxball game that does not produce correct output. "Hey, I Made that Shot!" Boxball game, with some added features like randomly sized ball objects, and the 10 second pause() before doing the hide() method action.

  • Boxball game: Lab 5 at 5 p.m. is okay. Lab 5 by 9 a.m. or 10 a.m. isn't required. Also important information about midterm EXAM.

  • EXAM WEDNESDAY: while loop and Color and FilledRect practice question and exercise. To be solved in Monday exam review, but try to solve it yourself FIRST, at least the simpler version. Can you solve this without looking at the book or lecture notes or blue sheet? Try to simulate the closed book test conditions and test your memory and understanding of the while loop pattern.

  • Midterm exam outline of topics and practice questions is still in progress.

  • Solution to while loop RED rectangles problem: while loop exercise has 5 staggered red rectangles.