For this assignment, you will implement member functions for a Sudoku game. Sudoku is a number placement puzzle. The objective is to fill a 9x9 grid so that each column, each row, and each of the 9 3x3 boxes contain the digits from 1 to 9. The game player is initially presented with a partially filled in grid (game board). The game player is to fill in the numbers that are missing using logic derived form the 3 rules below.

Rules

1) Each row has the numbers 1 to 9 with no duplicate numbers.
2) Each column has the numbers 1 to 9 with no duplicate numbers.
3) Each of the nine 3x3 boxes have numbers 1 to 9 with no duplicate numbers.

The location of the nine 3x3 boxes are shown in the grid.png file provided. The first 3x3 box starts at row/column position 1/1. The last 3x3 box starts at row/column position 7/7.

The list of member functions to implement include:

The default constructor Sudoku();
int addNumber(int row, int column, int number);
int remove(int row, int column);
void display();
void getBoard(int array[]);
bool hasPlayerWonGame();

A Main.cpp file is also provided which contains 22 test cases for the Sudoku class. You MUST implement the game board (grid) as an array of vectors, where each vector represents one row of the grid. You will receive little credit without meeting this requirement.

You will complete the functions in the Sudoku.cpp file. You will modify the Sudoku.h file as needed to implement the requirements. Do not change any of the existing definitions in the Sudoku.cpp or Sudoku.h files. You can create private member functions if needed for your implementation. You must use the supplied labels in the Sudoku.h file and follow best practices.

Display your name on the first line in the Main.cpp file where indicated. No other changes should be made to the Main.cpp file.

You will capture an image of your final test case output and submit that. Main.cpp, Sudoku.cpp, and Sudoku.h will initially compile as provided.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.