Maurice Tutor

(5)

$15/per page/Negotiable

About Maurice Tutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Algebra,Applied Sciences See all
Algebra,Applied Sciences,Biology,Calculus,Chemistry,Economics,English,Essay writing,Geography,Geology,Health & Medical,Physics,Science Hide all
Teaching Since: May 2017
Last Sign in: 408 Weeks Ago, 1 Day Ago
Questions Answered: 66690
Tutorials Posted: 66688

Education

  • MCS,PHD
    Argosy University/ Phoniex University/
    Nov-2005 - Oct-2011

Experience

  • Professor
    Phoniex University
    Oct-2001 - Nov-2016

Category > Management Posted 31 Jan 2018 My Price 9.00

method private boolean

Arrays (20 points) In the last several years, a new logical puzzle from Japan called Sudoku has become quite a hit in Europe and the United States. In Sudoku, you start with a 9x9 grid of numbers in which some of the cells have been filled in with digits between 1 and 9, as shown in the upper right diagram. Your job in the puzzle is to fill in each of the empty spaces with a digit between 1 and 9 so that each digit appears exactly once in each row, each column, and each of the smaller 3x3 squares. Each Sudoku puzzle is carefully constructed so that there is only one solution. Suppose that you wanted to write a program to check whether a proposed solution was in fact correct. Because that task is too hard for an array problem on an exam, your job here is simply to check whether the upper-left 3x3 square contains each of the digits 1 through 9. In the completed example (shown in the bottom right diagram), the 3x3 square in the upper left contains exactly one instance of each digit and is therefore legal.

If, however, you had made a mistake filling in the puzzle and come up with the following

instead, the solution would be invalid because this square contains two instances of the value 6 (and no instances of the value 2). Your task in this problem is to write a method private boolean checkUpperLeftCorner(int[][] matrix) which looks at the 3x3 square in the upper left corner of the matrix and returns true if it contains one instance of each of the digits from 1 to 9. If it contains an integer outside of that range or contains duplicated values, checkUpperLeftCorner should return false. In writing your solution, you may assume that the variable passed in as the matrix parameter has already been initialized as a 9x9 array of ints. You are also completely free to ignore the values outside of the 3x3 square in the upper left. Those values will presumably be checked by other code in the program that you are not responsible for.

Answers

(5)
Status NEW Posted 31 Jan 2018 12:01 AM My Price 9.00

Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------acq-----------uis-----------iti-----------on -----------of -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------.Pl-----------eas-----------e p-----------ing----------- me----------- on-----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be-----------

Not Rated(0)