CSE 131 Module 10: Class Hierarchies

Lab


Project: Brickbreaker

You are encouraged in this module to:


Brickbreaker is the game that you, CSE131 students, have identified as worthy of your efforts for our final assignment. The design and implementation of Brickbreaker also nicely demonstrates the principles of this module and incorporates components (Vector, etc.) that we have developed this semester.

In studio and lecture, you have helped develop a design of Brickbreaker, and an initial implementation was given to you in the studio.

As you consider the assignment below, you will need to make small changes to the existing code base in some cases. However, most of your code should be in classes that extend the functionality of existing classes. In each extending class, try to write as little code as possible, using inheritance to avoid duplicating existing code.


Directions: Familiarize yourself with the provided code base by
If you did not get through all the studio material, take some time to work through the parts you need for the game. Ask for help if you need it. It will be easier to do the work if you have a secure understanding of the principles of this module and the design of the game, before you start writing code.
Here's what you should do to get credit for Module 10 lab:

  1. Some interesting action should be taken when a Ball hits (intersects with) a Brick. Currently, the Controller arranges for things to happen when a Ball hits any of the four perimeter surfaces. Also, a Brick is killed when it hits the floor, but that is just for demonstration purposes.
  2. You must develop three different kinds of bricks. The brick types must be distinguishable by color, so that we can tell in a demo how each brick should behave.
    Think about the various behaviors you want for your three kinds of bricks. What do those behaviors have in common? Try to develop a superclass that captures common functionality, and extend that class to get the variation of behavior you desire.

    Here are some ideas about various Brick-like behaviors, but feel free to invent and experiment with your own:

  3. Your game must include at least two kinds of Balls, whose types must be visually distinguished by their color. Here are some ideas about Ball-like behaviors, but again feel free to improvise, invent, and experiment:
Note for the directions below. Use this file for a cover page file. Just copy it into your eclipse workspace and be sure to commit it.

Submitting your work (read carefully)



Last modified 19:55:26 CST 18 November 2009 by Ron K. Cytron