Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Sudoku is a logic game played on a 9x9 grid using the digits 1 through 9. The grid is further subdivided into nine 3x3 boxes.

image text in transcribed

Sudoku is a logic game played on a 9x9 grid using the digits 1 through 9. The grid is further subdivided into nine 3x3 boxes. The goal is to fill in the grid with digits such that one and only one of each digit 1 through 9 appear in every row, column, and box. Create a program that determines whether or not a Sudoku grid filled with numbers is a Sudoku. Import program1.zip (distributed in class) into Eclipse. As discussed in class, make sure that the program is well documented and submitted on time. The code is incomplete, you will have to write the fillGrid and evaluate methods where indicated by the statement: JOptionPane.showMessageDialog(this, "Write the necessary code to ..."); The program starts with an empty grid (See Figure 1). Enter numbers into the grid so that every row, column and 3x3 box contains every digit from 1 to 9 inclusive (see Figure 2) To enter the numbers, click the button, at the bottom of the window, with the number you wish to enter, and then click the button in the grid into which the number should be placed Instead of entering the numbers, there is also an option in the File menu (Fill Grid) that can fill in the numbers read from a file. You will have to complete this code Sudoku1.txt, Sudoku2.txt, and Sudoku3.txt contain data that can be used to test your program. The files are located in http://venus.cs.gc.cuny.edu/aabreu/cs212/project1/. After entering the numbers, click the pen (icon next to the 9) to evaluate the grid. You will also have to write the code for the evaluate method and display a message indicating whether or not the grid represents a Sudoku Sudoku v0.99 File Help Sudoku vO0.99 File Help 6 8 3 21759 Figure 1 Figure 2 Sudoku is a logic game played on a 9x9 grid using the digits 1 through 9. The grid is further subdivided into nine 3x3 boxes. The goal is to fill in the grid with digits such that one and only one of each digit 1 through 9 appear in every row, column, and box. Create a program that determines whether or not a Sudoku grid filled with numbers is a Sudoku. Import program1.zip (distributed in class) into Eclipse. As discussed in class, make sure that the program is well documented and submitted on time. The code is incomplete, you will have to write the fillGrid and evaluate methods where indicated by the statement: JOptionPane.showMessageDialog(this, "Write the necessary code to ..."); The program starts with an empty grid (See Figure 1). Enter numbers into the grid so that every row, column and 3x3 box contains every digit from 1 to 9 inclusive (see Figure 2) To enter the numbers, click the button, at the bottom of the window, with the number you wish to enter, and then click the button in the grid into which the number should be placed Instead of entering the numbers, there is also an option in the File menu (Fill Grid) that can fill in the numbers read from a file. You will have to complete this code Sudoku1.txt, Sudoku2.txt, and Sudoku3.txt contain data that can be used to test your program. The files are located in http://venus.cs.gc.cuny.edu/aabreu/cs212/project1/. After entering the numbers, click the pen (icon next to the 9) to evaluate the grid. You will also have to write the code for the evaluate method and display a message indicating whether or not the grid represents a Sudoku Sudoku v0.99 File Help Sudoku vO0.99 File Help 6 8 3 21759 Figure 1 Figure 2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

AutoCAD Database Connectivity

Authors: Scott McFarlane

1st Edition

0766816400, 978-0766816404

More Books

Students also viewed these Databases questions

Question

Find the derivative of y= cos cos (x + 2x)

Answered: 1 week ago