Question
How would a Data Flow Diagram look for a basic Sudoku Program, and how would all the input to storage, and all the data from
How would a Data Flow Diagram look for a basic Sudoku Program, and how would all the input to storage, and all the data from storage back to the user be traced with this diagram? It would have these rules:
The constraints are the following:
- There is no more than one instance of a given number on a given row.
- There is no more than one instance of a given number on a given column.
- There is no more than one instance of a given number on an inside square (the 3x3 squares embedded in the 9x9 grid).
- Every square can consist of a single digit between 1 and 9 exclusively, or can be blank.
The game is finished when every square in the 9x9 grid is filled.
The program will prompt the user for the filename of the game he or she is currently working on and display the board on the screen. The user will then be allowed to interact with the game by selecting which square he or she wishes to change. While the program will not solve the game for the user, it will ensure that the user has not selected an invalid number. If the user types 'S' in the prompt, then the program will show the user the possible valid numbers for a given square. When the user is finished, then the program will save the board to a given filename and exit.
Consider a game saved as myGame.txt:
{ "board": [ [ 7, 2, 3, 0, 0, 0, 1, 5, 9 ], [ 6, 0, 0, 3, 0, 2, 0, 0, 8 ], [ 8, 0, 0, 0, 1, 0, 0, 0, 2 ], [ 0, 7, 0, 6, 5, 4, 0, 2, 0 ], [ 0, 0, 4, 2, 0, 7, 3, 0, 0 ], [ 0, 5, 0, 9, 3, 1, 0, 4, 0 ], [ 5, 0, 0, 0, 7, 0, 0, 0, 3 ], [ 4, 0, 0, 1, 0, 3, 0, 0, 6 ], [ 9, 3, 2, 0, 0, 0, 7, 1, 4 ] ] }
Note that '0' corresponds to an unknown value. The following is an example run of the program.
Edit: I don't really need the code, I think I can get some of it down after I get the program on a conceptual level.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started