/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /** * * @author 11565 */ public class MyArrays { //This method will simply sum all the elements in the 2D array and return that sum public int sum2DArray(int[][] matrix) { return 0; } //This method will find the largest value in the 2D array and return that value public int findLargest(int[][] matrix) { return 0; } //This method receives two identically sized integer arrays. It will build and return a new //array of the same size. Each element in the new array will hold the sum of the corresponding //values from the two received arrays public int[][] sumArrays(int[][] a, int[][] b) { return null; } //Return a new array of integers where every even integer has been changed to 0 public int[][] eraseEvens(int[][]a) { return null; } //You receive an 8x8 2D array of characters. It consists of either 'N' meaning empty, 'K' for King or 'Q' for Queen //Your method should return true if there is no valid movement for the king (checkmate). A king can move in any adjacent square. //A Queen can move vertically, horizontally or diagonally in any direction. A king cannot move into check //If there is a "safe" adjacent space for the king, the method should return false. public boolean isCheckmate(char[][]board) { return true; } }