Question: CSC-151 JAVA Programming Programming Project 3 Problem Description Given a fully populated 16 x 16 X-Sudoku grid (4 x 4 box) as input, verify that

CSC-151 JAVA Programming Programming Project 3 Problem Description Given a fully populated 16 x 16 X-Sudoku grid (4 x 4 box) as input, verify that it is a valid solution. Sudoku is a numbers puzzle and X-Sudoku is a variant of Sudoku. The objective of Sudoku is to take a partially filled puzzle grid and find the missing values given the following constraints: 1. No row can contain a repeated value 2. No column can contain a repeated value 3. No box (inner squares of the grid) can contain a repeated value Standard Sudoku uses a 9 x 9 grid containing 9 - 3 x 3 boxes and is populated by the values 1 - 9 as illustrated in Figure 1. Every column contains 1-9 with none repeating Every inner box (square) contains 1-9 with none repeating Every row contains 1-9 with none repeating Figure 1. V 1.0 In this assignment, the Sudoku grid is 16 x 16 containing 16 - 4 x 4 boxes. It is populated by the values 1 - 9; A - G for a total of 16 possible values as illustrated in Figure 2. Figure 2. Additionally, this assignment uses the X-Sudoku variant which adds one more constraint - no value can be repeated in the two diagonals as illustrated in Figure 2; which is a complete and valid solution. For more details on Sudoku, go to this Wikipedia page -> Sudoku V 1.0 Program Design Requirements Input I will provide two valid solution grids for you to use as test input. You can then manipulate the values in the valid solution grids (either manually or otherwise, your choice) to create invalid grids to test. You can also create your own test grids. Your program can be written with the assumption that any cell will contain 1 - 9 or A - G with no empty cells. No validation code for this condition needs to be written. Processing Use a 2-Dimension array of data type char to store your grid. Use nested for-loops to verify each row, column and box contains unique values. Output Display the input grid. In a complete sentence, state that the grid is a valid solution or is not a valid solution. Required Components The program must only have these three methods - no more and no fewer. A main method that: 1. Defines the 2-D array 2. Calls a method that displays the grid 3. Calls a method that validates the grid 4. Displays the results of the validation A method that: 1. Receives the 2-D grid array as a passed parameter 2. Displays the grid 3. Returns nothing (void) A method that: 1. Receives the 2-D grid array as a passed parameter 2. Validates the grid 3. Returns a Boolean value; true for valid and false for invalid Use Constants for all literals (hard-coded values), such as grid size. There must be no literals anywhere in your program except when the Constants are defined or when for-loop counter variables are initialized (such as 0 or 1). Include line comments in your program that describe what the code is doing and why it is doing it. Use block comments at key points in the program (e.g. the top of the program and the top of each method) for a high-level, conceptual, design narrative; then include more specific comments before each line of code. I consider commenting an integral component of this assignment, and therefore it will be graded as such. Simply put, if you cannot explain what the code does and why it does it, in very specific terms, then I will assume that you did not write it. Your comments need to convince me that you are the sole author of the code that you submit. Warning: I will be scrutinizing code for plagiarism. V 1.0 Do not create any further modularity than what is described above without checking with me. In other words, your program should only have a main method and the two methods described above. Program Execution Your program execution should appear as follows, using this wording and formatting or something very similar. V 1.0 V 1.0 Grading Criteria Readability and organization Comments well placed and descriptive Indentation Naming conventions Use of whitespace Points 25 Program Accuracy Program contains no errors: syntax, logic, runtime Program functions as intended by the assignment specifications Programs that do not run will receive no credit in this criterion 50 Program has required elements: Must contain and make proper use of the following: Appropriate use of Data Types Appropriate use of Constants with no hard-coding of literals Use of nested For-Loops Use of 2-D array One method to display the grid One method to validate the grid 25 100 V 1.0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
