JAVA PROGRAMMING, please no copy paste from other solutions. In a Sudoku game, we have to re-build
Fantastic news! We've Found the answer you've been seeking!
Question:
JAVA PROGRAMMING, please no copy paste from other solutions.
Transcribed Image Text:
In a Sudoku game, we have to re-build a grid with 9 rows and 9 columns. Each row and each column must contain all integers from 1 to 9. You must create a programm that allows you to load Sudoku grids from files, manipulate the grids (placements, checks), then finally reproduce the grids again either on screen or in files. Sudoku files contain a sequence of number triplets separated by spaces, where each triplet corresponds to: x: line number. y: column number. z: value In computing, columns and rows are most often numbered starting with zero. Examples: Content of file part1.txt 001 012 023 034 045 056 067 078 089 102 113 124 135 146 157 168 179 181 203 214 225 236 247 258 269 271 282 304 315 326 337 348 359 361 372 383 405 416 427 438 449 451 462 473 484 506 517 528 539 541 552 563 574 585 607 618 629 631 642 653 664 675 686 708 719 721 732 743 754 765 776 787 809 811 822 833 844 855 866 877 888 Contents of the file part2.txt 016 112 214 19 417 511 618 713 815 027 129 221 328 425 523 626 722 824 033 138 235 332 436 534 631 737 839 048 141 243 347 449 545 644 746 842 059 157 252 351 454 556 655 758 853 065 164 266 363 462 568 667 769 861 074 173 279 376 471 577 672 775 878 081 186 288 385 483 582 689 784 887 092 195 297 394 498 599 693 791 89 Contents of the part3.txt file 014 116 218 313 411 517 615 712 819 022 127 225 324 428 529 623 726 821 031 133 239 335 436 532 637 734 838 045 148 246 349 447 541 642 743 844 057 159 252 356 454 553 651 758 855 063 161 264 362 465 568 669 767 866 079 174 273 371 472 576 678 775 877 086 182 287 388 489 585 684 781 883 098 195 291 397 493 594 696 799 892 In these examples, the data is not necessarily correct. It's your job to create a program that can handle errors. You can create such a file on your machine with a text editor or you can use the preconfigured repl.it project where this file already appears. Required Features/Classes Your program must do three specific things: -Load a file containing data according to the specified format (a sequence of digit triplets 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 table. 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 is work, we do not require that each 3x3 subgrid contain all the digits from 1 to 9 (you can, however, do this additional check if you wish). If there is an error, your program should throw an exception. -Your program should then apply a transposition to the array corresponding to a transposed matrix calculation and display the result on the screen. Instead of displaying it on the screen, you (as the programmer) can save it as a new file or use another means of transmission. Choose the approach that most appeals to you as a programmer. You should test your solution with more than one grid; in particular, include a grid that is asymmetrical (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. You must explain your program carefully and in detail. Each function and each variable of the program must be justified. The qualifiers (static, public, protected and private) must be justified one by one: you cannot use the keyword "static" without justifying it. In a Sudoku game, we have to re-build a grid with 9 rows and 9 columns. Each row and each column must contain all integers from 1 to 9. You must create a programm that allows you to load Sudoku grids from files, manipulate the grids (placements, checks), then finally reproduce the grids again either on screen or in files. Sudoku files contain a sequence of number triplets separated by spaces, where each triplet corresponds to: x: line number. y: column number. z: value In computing, columns and rows are most often numbered starting with zero. Examples: Content of file part1.txt 001 012 023 034 045 056 067 078 089 102 113 124 135 146 157 168 179 181 203 214 225 236 247 258 269 271 282 304 315 326 337 348 359 361 372 383 405 416 427 438 449 451 462 473 484 506 517 528 539 541 552 563 574 585 607 618 629 631 642 653 664 675 686 708 719 721 732 743 754 765 776 787 809 811 822 833 844 855 866 877 888 Contents of the file part2.txt 016 112 214 19 417 511 618 713 815 027 129 221 328 425 523 626 722 824 033 138 235 332 436 534 631 737 839 048 141 243 347 449 545 644 746 842 059 157 252 351 454 556 655 758 853 065 164 266 363 462 568 667 769 861 074 173 279 376 471 577 672 775 878 081 186 288 385 483 582 689 784 887 092 195 297 394 498 599 693 791 89 Contents of the part3.txt file 014 116 218 313 411 517 615 712 819 022 127 225 324 428 529 623 726 821 031 133 239 335 436 532 637 734 838 045 148 246 349 447 541 642 743 844 057 159 252 356 454 553 651 758 855 063 161 264 362 465 568 669 767 866 079 174 273 371 472 576 678 775 877 086 182 287 388 489 585 684 781 883 098 195 291 397 493 594 696 799 892 In these examples, the data is not necessarily correct. It's your job to create a program that can handle errors. You can create such a file on your machine with a text editor or you can use the preconfigured repl.it project where this file already appears. Required Features/Classes Your program must do three specific things: -Load a file containing data according to the specified format (a sequence of digit triplets 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 table. 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 is work, we do not require that each 3x3 subgrid contain all the digits from 1 to 9 (you can, however, do this additional check if you wish). If there is an error, your program should throw an exception. -Your program should then apply a transposition to the array corresponding to a transposed matrix calculation and display the result on the screen. Instead of displaying it on the screen, you (as the programmer) can save it as a new file or use another means of transmission. Choose the approach that most appeals to you as a programmer. You should test your solution with more than one grid; in particular, include a grid that is asymmetrical (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. You must explain your program carefully and in detail. Each function and each variable of the program must be justified. The qualifiers (static, public, protected and private) must be justified one by one: you cannot use the keyword "static" without justifying it.
Expert Answer:
Answer rating: 100% (QA)
To fulfill the requirements and create a program that loads validates transposes and displays Sudoku grids well structure our solution as follows Sudo... View the full answer
Related Book For
Introduction to Algorithms
ISBN: 978-0262033848
3rd edition
Authors: Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest
Posted Date:
Students also viewed these programming questions
-
JAVA Sudoku problem In a Sudoku game, we have to re-build a grid with 9 rows and 9 columns. Each row and each column must contain all integers from 1 to 9. You need to program a code that allows you...
-
Use the attached "words.txt" file to store the words along with their ranks in an AVL tree. Then provide the user the option to search for any word. If the word exists the program displays the rank...
-
Five separate projects have calculated rates of return of 8, 11, 12.4, 14, and 19% per year. An engineer wants to know which projects to accept on the basis of rate of return. She learns from the...
-
The amount of heat per second conducted from the blood capillaries beneath the skin to the surface is 240 J/s. The energy is transferred a distance of 2.0 1023 m through a body whose surface area is...
-
When the slopes for both credit cards are the same (parallel lines), does this provide any useful information?
-
Tony is a sole proprietor who owns 40 cabs doing business in Chicago under the name of Tonys Cabs. The companys total net worth is over one million dollars and Tony has personal assets totaling...
-
The following information is taken from the accounts of Latta Company. The entries in the T-accounts are summaries of the transactions that affected those accounts during the year. The overhead that...
-
The DD-AA model predicts that a permanent increase in foreign money demand will lead to an improvement in the domestic current account. True/False/Uncertain, explain and support your answer with ONE...
-
For the case The WM. Wrigley Jr. Company: Capital Structure, Valuation, and the Cost of Capital(Darden Case: UVAF1482) please answer the following questions and explain your reasoningwhere...
-
Question 14 Not yet answered Marked out of 4.00 Flag question Partridge Plastic's stock has an estimated beta of 1.4, and its required rate of return is 13 percent. Cleaver Motors' stock has a beta...
-
What is to be delivered throughout the project? What are key milestones to be throughout the life of the project? List the activities and tasks and indicative completion dates for the project.
-
S wants to place property in an irrevocable trust for his 14-year-old granddaughter. The trust instrument provides for the accumulation of the trust income until the granddaughter reaches age 21, at...
-
Why did the sterling-based gold standard originally unravel?
-
Do you think the potential sale of the Stock business in the US will be enough to relieve the current pressure on Wolco's balance sheet? What value would potentially need to be achieved to provide a...
-
Green LTD has a Note Receivable of $5,000. The note will be collected in installments. $1,000 is due one years and the remainder is due after a year. What is the classification of the note on the...
-
If fx)=3x-2, g(x)=/x+4 then domain of the function x) is x > -4 Ob* >-4 x < Oc* -4 Od
-
QUESTION 2 The CEO of Farisha Hijab Sdn Bhd insisted on further investigation to be carried out that he also required Mr Muaz to conduct the analysis of variance for the material and labour of the...
-
What is the probability that a k-string over a set of size n forms a k-permutation? How does this question relate to the birthday paradox?
-
Adapt the aggregate proof of Theorem 21.1 to obtain amortized time bounds of O(1) for MAKE-SET and FIND-SET and O(lg n) for UNION using the linked-list representation and the weighted-union heuristic.
-
Give a (n)-time non recursive procedure that reverses a singly linked list of n elements. The procedure should use no more than constant storage beyond that needed for the list itself.
-
Based on Exhibit 1, what is the foreign exchange gain resulting from Transaction 3 on the December 31, 2016 fi nancial statements? A . NVK1.70 per ton B . NVK90.75 per ton C . NVK248.54 per ton
-
Which transaction would generate foreign currency transaction exposure for Ambleu? A . Transaction 1 B . Transaction 2 C . Transaction 3
-
Yus determination regarding Transaction 2 should be based on the currency of the: A . loan. B . bank. C . borrower.
Study smarter with the SolutionInn App