/** * Write a description of class LabWeek9 here. * * @author (your name) * @version (a version number or a date) */ public class LabWeek9 { // returns the largest element in a // e.g. max({{1, 3}, {7, -2, 0}, {4, 4}}) = 7 public static int max(int[][] a) { // TODO return 0; } // returns the sum of the elements in the xth row in a // e.g. rowSum({{3}, {8, -2, 6}, {5, -2}}, 1) = 8 + (-2) + 6 = 12 public static int rowSum(int[][] a, int x) { // TODO return 0; } // returns the sum of the elements in the xth column in a // e.g. columnSum({{3, 4}, {6}, {0, 8, -2}}, 1) = 4 + 8 = 12 public static int columnSum(int[][] a, int x) { // TODO return 0; } // returns an array holding the sums of the rows in a // e.g. allRowSums({{1}, {2, 3}, {4, 5, 6}}) = {1, 5, 15} public static int[] allRowSums(int[][] a) { // TODO return null; } // returns true iff a is square, // i.e. iff every row has the same length as the number of rows public static boolean isSquare(int[][] a) { // TODO return true; } }