Due Friday 2/13 - 5PM
The goals of this project are as follows:
- become familiar with Java syntax
- if statements
- file i/o
- practice using object-oriented design and classes
- practice algorithmic thinking and problem solving
For this project, you will implement a game of Sudoku. If you are not familiar with Sudoku, you can play a web version of the game at http://websudoku.com/
Your version of the game will provide the user with a text-based interface. Your interface will repeatedly display the current puzzle and ask the user to enter the value for another square by prompting for the row, column, and value. When all squares are full, your program will check the solution and inform the user if the solution is correct or incorrect. Click here
for a sample run of your program.
At minimum, your program must handle the following erroneous situations:
| Program Response|
|The file name entered does not refer to a file that exists.||Either ask the user for a new file name or exit the program gracefully.|
|The file specified is not in the correct format.||Either ask the user for a new file name or exit the program gracefully.|
|The row entered is not 1-9.||Prompt for another choice. |
|The column entered is not 1-9. ||Prompt for another choice. |
|The value entered is not 1-9. ||Prompt for another choice|
|The square the user specifies was filled in the original puzzle.||Prompt for another choice. |
For full credit, you must implement the design specified in the javadoc found here
. If you wish to modify or change the design, please make an appointment to speak with the instructor about your proposed design.
It is recommended that you implement and test your classes in the following order:
- Implement checkRow and checkColumn first and checkSubsquare last.
Here are a few sample boards to get you started:Submission Instructions