Bill Manaris : Spring 2006 / CSCI 221 Homework 2

Assigned Date: Tuesday, Jan. 31, 2006
Due Date: Tuesday, Feb. 7, 2006
Due Time: 11:55pm

Last modified on February 06, 2006, at 10:02 AM (see updates)


This assignment focuses on Unit Testing. You are expected to work in isolation (without access to any resources other than the class textbook, class notes, and the instructor).


Below you will find an OO design of Java classes for the game Tic-Tac-Toe.

Implement a test suite for diagnosing bugs in the future system implementation.

In the spirit of test-first development, do not implement the Tic-Tac-Toe game at this time.

  1. First create a stubbed implementation of the given OO design.
    • Again, do NOT implement the complete functionality.
    • Within your classes, provide only method signatures, and empty bodies (for void methods) or dummy return statements (for non-void methods).
  2. Using BlueJ's jUnit functionality, implement your tests as jUnit test classes and methods.
    • Focus on functional cohesion, i.e., a test method should focus only one bit of functionality. The smaller, the better.


Your program stub should be implemented using BlueJ. Create a project called, what else, TicTacToe. In that project create the following classes and stub methods:


Your test methods should be documented via javadoc. One should look at your javadoc API to determine the extent of your test suite.


  1. Open your BlueJ project.
  2. Open (edit) each source file and generate the class interface (javadoc). This can be done within the editor window either by pressing CTRL/J , or selecting the Interface drop-down menu item (on the right). (Note: This is necessary to generate your documentation for grading.)
  3. Under the Project menu, click Create Jar File... . In the dialog box that opens, select Include Source, and press Continue.
  4. Verify that the .jar file is correct, by using the 'jar xvf file.jar' command, where file.jar is your archive. Your .jar file should contain:
    • Readme.txt (see Widget for a sample).
    • Any files generated automatically by BlueJ (e.g., bluej.pkg, bluej.pkh, etc.).

In other words, I should be able to unzip your submission and run it without modifications or additions.

  1. Email the generated .jar file to, by the due date and time.
(Printable View of