Assignment 8

Mutating Object State

A more detailed description of the assignment is now posted here.

The goal of this assignment if to learn to design methods in the imperative style, including the design of the tests for these methods.

Choose either one of the games you have already finished in the first part of the course, or the game you were designing for this segment of the course. Design the game in the imperative style. Read the textbook sections that describe in detail the imperative world.

The key issue is that instead of producing a new instance of the world for each tick, or in response to each tick event, the world state is mutated to represent the new state.

For this problem you will use the idraw.jar library instead of draw.jar you have used before.

Due Date Thursday, November 6, 10:00 pm.


The following example from the javalib web pages illustrates the design of a game in the imperative style, including the examples of the design of the tests:

BlobWorld.java