Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How would a Structure Chart (not code) look for a basic Sudoku program? Structure Chart example: The rules would be as follows: There is no

How would a Structure Chart (not code) look for a basic Sudoku program?

Structure Chart example:

image text in transcribed

The rules would be as follows:

  • 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.

PROCESS SUBSCRITION valid sub item valid sub item GET VALID SUB ITEM PROCESS VALID ITEM renew sub sub item sub item new sub_o cancel sub READ SUB ITEM VALIDATE SUB ITEM PROCESS NEW SUBSCRIPTION PROCESS CANCELATION PROCESS RENEWAL record record new subo record Flag ADD NEW RECORD CREATE BILL CREATE AUDIT RECORD

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

Step: 3

blur-text-image

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

Intranet And Web Databases For Dummies

Authors: Paul Litwin

1st Edition

0764502212, 9780764502217

More Books

Students also viewed these Databases questions

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago