Question: Write a class called Labl3 that has a mefhod addTo10 (below) Ihat accepts a 2 dimensional array oi integers. Each row will have ONE element

Write a class called "Labl3" that has a mefhod addTo10 (below) Ihat accepts a 2 dimensional array oi integers. Each row will have ONE element with a value of 0. For each row, change this element so that sum of all numbers in the row is 10. None of the other elements should be changed. public static void addTo10 (int[][] array) //Your code here Write to class "Lab13" a method "setHints" (below) that accepts a 2 dimensional array of integers containing -1's and O's and modifies it according to the following (minesweeper) criteria: to hint of its presence, for each mine (a value - 1) increment by 1 the value of all its surrounding squares; if another mine exists in one of these squares, its value is leit unchanged. public static void setHints (int array) //Your code here The figure below illustrates the state of an array at the beginning of the method (left) and at the end of the method (right) after all the hint values have been added. 11 0 0 0 0 0 01 1 2 1 0 0 2 1 31 0 0 0 1 0 0 0 0 0 o 0 0 0 0 1 110
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
