Question: Answer must be in Java and preference for not including BufferedReader You will be writing a program to load a file containing a solved sudoku

 Answer must be in Java and preference for not including BufferedReaderYou will be writing a program to load a file containing asolved sudoku puzzle, and verifying it's correctness. The goals of this projectare: - Read a file - Input data from a file into

Answer must be in Java and preference for not including BufferedReader

You will be writing a program to load a file containing a solved sudoku puzzle, and verifying it's correctness. The goals of this project are: - Read a file - Input data from a file into a 2-dimensional array - Test the data - Output the results 1) You will need to write a function that will load the file data into a two-dimensional array: public static boolean LoadFile(String filename, int[][] data) This function will return true if the file is read properly. If the file is non-existent, empty, or does not contain the proper amount of data, the function should return false. 2) Write functions that will validate the solution by testing that rows, columns, and boxes contain one (and only one) of each digit. The function should return true if valid and false otherwise. Note: the rows, cols, and boxes start with 1 not 0 . public static boolean TestRow(int[][] data, int row) public static boolean TestColumn(int[][] data, int col) public static boolean Testbox(int[][] data, int box) 3) Write a function that will display the solution on the screen (no spaces, output should be a 9x9 number grid). public static void Display(int[][] data) 4) Write your main ( ) function to do the following: - Prompt for the file name Enter the filename: - If there is an error reading the file, display the message Error reading file. and exit. - Display the solution, e.g. 543678912672195348198342567859761423426853791713924856961537284287419635345286179 - Print the results of validation: Row 3 is invalid. Column 5 is invalid. Box 9 is invalid. or The solution is valid

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!