COMP 303 Fall 2007

Project Part 2


To provide an opportunity to gain additional experience and skills with:

Required Problem

Implement the Game module (see the project overview). This module should be made accessible through a class game.GameModel that will control the state and playing of the game for one human and three computer players. This state should include, for example, the cards played, the bids, the score of each player, which player is the dealer, etc. This module should have no GUI, but should provide an API allowing clients to "virtually" play the game, i.e., change the state of the object to allow it to control the playing of a given number of rounds (or until one player busts).

It is your responsibility to design a module with an interface meeting the principles seen in class, and that will make it as convenient as possible to create the user interface.

Besides the main GameModel class, you can create as many helper classes as necessary to solve the problem.

The only "hard" requirement for the GameModel class is that is plays the role of the Subject in the Observer design pattern.

You must provide a set of unit tests that demonstrate and test your Game module. You should have unit tests for each method of your GameModel class (except trivial getters and setters). In addition, you must provide a driver program (i.e. a main method) that simulates playing a game using GameModel.


  1. A jar file containing all your code and class files. Please submit through WebCT. See the schedule for the deadline.
  2. A UML state diagram modeling the GameModel object. The diagram must be in jpeg format.


This part will be marked out of 30 and will be worth 30% of the overall project grade. It will also be the backbone for your GUI so it is important that you do it well. In marking your project, we will looking for the following points: