COMP 303 (Fall 2005) Project Deliverable One

Due Date: Thursday September 22, 2005, 11:59 AM.

Goal

To implement the statistics module. This module of the game is used to store player and game statistics. We are interested in storing information which can be later used to compute interesting facts about each player. For each hand played and for each player who took part in the hand, store the player id, amount bet and the result of the hand for each player. The statistics module is to be used by the dealer module.

Required Problem

An interface has been designed for the statistics module. Implement the functionality for this interface.
  1. Set up a new Java project in Eclipse.
  2. Import IStats.java in your project.
  3. Generate the JavaDoc as seen in class. Remember: right-click on a project and export as Javadoc. In the box "Extra Javadoc options..." type -tag precondition:cm:"Precondition:" -tag postcondition:cm:"Postcondition:".
  4. Study the documentation of IStats.
  5. Design a solution for your implementation of IStats. Document your design with a class diagram.
  6. Implement your design. Your implementation should include a class comp303.Stats that implements this interface. Do not modify IStats. We will test your class by linking it to a JUnit test module.
  7. Write your own JUnit Test Case for testing IStats. Make sure to test the class as thoroughly as possible.
In a zip file, submit:

Optional Problem

Design your solution so that it is possible to store statistics in two different formats (e.g., comma-separated text and XML). How can you do this and still respect the IStats interface?

Tools and Concepts

You are expected to use the following tools in developing this module:

Evaluation

You will be evaluated on how closely you have followed the guidelines provided to you in this document. The implementation of the stats module will be checked and your JUnit tests will be evaluated based on test coverage. Further unit testing will be applied to check for missed cases.

Resources