Problem
In a Sudoku game, we have to re-construct a grid with 9 rows and 9 columns. Each row and
column must contain all integers from 1 to 9.
You must create software that allows you to load Sudoku grids from files, manipulate the grids
(placements, checks), then finally reproduce the grids again either on the screen or in files.
Sudoku files contain a series of triples of numbers separated by spaces, where each triple
corresponds to:
x: line number.
y: column number.
z: value
In computing, we most often number columns and rows starting with zero.Requested
Features/Classes Your program must do three specific things:
Load a file containing data in the specified format (a sequence of triples of numbers separated by
spaces). You can choose the approach you prefer. The file can be retrieved online, by opening a
file on your disk or by standard input (stdin). Your code should handle read errors.
Validate that the file corresponds to a valid Sudoku board. That is, it must correspond to a 9x9
table where each digit from 1 to 9 appears only once per column and only once per row. For the
purposes of this work, we do not require that each 3x3 sub grid contain all the digits 1 to 9 (you
can do this additional check if you wish, however). In case of an error, your program must
generate an exception.
Your program should then apply a transpose to the table corresponding to a transposed matrix
calculation and display the result on the screen. Instead of displaying it on screen, you (as the
programmer) can save it as a new file or use another means of transmission. Choose the
approach that appeals to you the most as a programmer. You need to test your solution with more
than one grid; In particular, include a grid that is asymmetric (that is not identical to its
transpose) in your tests. Give the result of at least two different tests, beyond the part1.txt file.
You can use screenshots to present your results.
Fig: 1