Project 1 - A Sudoku Game

Due - Monday, February 5, 2007

The goal of this project is to give you an opportunity to practice using Java. Your program must use classes where appropriate. Points will be awarded for good design (and deducted for bad design!). A program that contains all code in a giant main method will receive 0 points for design.

For this project, you will write a program that allows a user to play Sudoku. You can visit the following website for an example of how the game works: http://www.websudoku.com/.

Your program will work as follows:
  1. Read a 9x9 board configuration from a file. Following are several examples: Board 1 Board 2 Board 3. You should consider using a multidimensional array to store the data.
  2. Allow the user to fill in the empty squares. You will implement a text-based version of the game. Therefore, the user will need to specify both the square in which she would like to play as well as the number she would like to place there. For example, you might label the columns using letters (A through I) and the rows using numbers (1 through 9). That would allow a user to select a box by specifying column and row, e.g., A1.
  3. Allow the user to specify when she has completed her entries and would like to check her solution.
  4. Verify the solution by checking that each row contains all of the numbers 1-9, each column contains all of the numbers 1-9, and each 3x3 subsquare contains all of the numbers 1-9. Note that there are 9 non-overlapping subsquares. Also note that if the user has failed to fill in a paricular square then her solution is incorrect.

Due 9:40AM Monday February 5, 2007

  1. Complete and submit your working code. Turn in a hard copy in class and place a copy of your .java files in /home/submit/cs112-s07/username.
  2. Make sure that each function is well documented. Your documentation should specify the type and function of the input parameters and output.
  3. Run your program on a variety of inputs ensuring that all error conditions are handled correctly.
Note: No portion of your code may be copied from any other source including another text book, a web page, or another student (current or former). You must provide citations for any sources you have used in designing and implementing your program.
Sami Rollins