2-dimensional Arrays

SumArrayExperiments.java contains different strategies for summing the entries in a 2-dimensional array of integers. In class, we wrote code to do this using a row-wise traversal and a column-wise traversal. This Java class shows two other strategies. Note: some of these strategies will not work if the array is rectangular or if each row has a different length. Run the code to see which strategies throw a runtime exception for which arrays.

The following code shows a complete (fixed) implementation of TicTacToe. In class, we worked on methods to detect a win in a row, a column, or one of the diagonals. I am showing 3 different ways of detecting a win in the diagonals (one of which we did in class).