Assignment 4
Designing Methods for Complex Class Hierarchies
Text as pdf
A file
files-directories.java
Due Date Thursday October 9, 10:00 pm.
For assignment 4 hand in at least two out of the three problems: 4.1, 4.2, 4.3.
The third problem (if you do not finish it this week) will be a part of the next assignment.
To complete your game do the following:
- Look at the sample mini-world game posted with the course lectures. (We have done something similar in the class today.)
- Draw the shapes for each object in your world directly - you do not need to use the IShape class hierarchy - at this point it just makes the game more complex.
- Start small: design the smallest game you can with just no more than three objects and make sure it works. Save it.
- Using the small game you have built, add new features: interaction between the objects, what happens when an object moves out of bounds and needs to be replaced by a new one, how do you determine that the world/game should end, etc. For each new feature: think what it should do, follow the design recipe in writing down the purpose statement, designing the method(s), including the examples and tests, then run the game. One step at a time.
- Hand in the small game and however far you get with the additions.
Post any questions you may have on the course wiki.