Sudoku Grid ( Due 30 Mar 2012 )
A Sudoku grid is a 9 x 9 matrix that is made up of 3 x 3 sub-matrices.
At the start, some of the cells already contain numbers. The goal of this
puzzle is to fill the remaining cells such that each row, each column, and
each sub-matrix contain the numbers 1 through 9 exactly once.
The object of this assignment is to verify that a given 9 x 9 matrix
of numbers is a valid Sudoku grid. You will read the input from the
file sudoku.txt. You will print out the
9 x 9 matrix and write if it is a valid or invalid Sudoku grid. Your
output will be of the form:
1 2 3 4 5 6 7 8 9
9 8 7 6 5 4 3 2 1
5 6 4 9 1 8 7 3 2
2 3 7 8 9 1 4 6 5
4 5 6 7 8 9 3 2 1
7 8 9 3 2 5 6 1 4
6 5 1 9 3 4 7 2 8
8 2 3 6 1 7 9 4 5
3 7 6 2 8 2 1 9 4
Not valid Sudoku grid.
We will be looking at good documentation, descriptive variable names, and
adherence to the coding convention mentioned below. Your file Sudoku.java
will have the following header:
/*
File: Sudoku.java
Description:
Student Name:
Student UT EID:
Course Name: CS 312
Unique Number:
Date Created:
Date Last Modified:
*/
You will follow the standard Java
Coding
Conventions. You can either view the HTML page or download the
PDF or Postscript and print it out. There is a modification that I
would like to make to the standard coding conventions. Please align
the opening and closing braces vertically so that you can easily
make out the blocks of code. For example:
Do this:
if ( x > 5 )
{
a = b + c;
}
Not this:
if ( x > 5 ) {
a = b + c;
}
Use the turnin
program to submit your .java file.
The TAs should receive your work by 11 PM on Friday, 30 Mar 2012.
There will be substantial penalties if you do not adhere to the
guidelines. The TA in charge of this assignment is Vinodh Rajendran
(vinodh@cs.utexas.edu).
- You must submit the .java file and not the .class file.
- Your .java file should have the header with the proper documentation.
- You should be submitting your .java file through the web based
turnin program. We will not accept files e-mailed to us.
- Compile and run your code on the command line.
- Your code must compile before submission.
- Here is the Grading Criteria.