public class MatrixManipulator
{
    private static boolean atLeastOneByOne(int[][] matrix)
    {
        return matrix != null && matrix.length > 0 && matrix[0].length > 0;
    }
    
    /**
     * Determines if (first + second) is defined where +
     * indicates matrix addition.
     * @return true if matrix addition is defined, false otherwise.
     */
    public static boolean addable(int[][] first, int[][] second)
    {
        return false; // TODO: implement
    }

    /**
     * Performs (first + second) where + indicates matrix addition.
     * Precondition: addable(first, second)
     * @return the result of first + second.
     */
    public static int[][] add(int[][] first, int[][] second)
    {
        return null; // TODO: implement
    }

    /**
     * Performs (scalar * matrix) where * indicates
     * scalar multiplication of a matrix.
     * Precondition: matrix.length > 0 && matrix[0].length > 0
     * @return the result of scalar * matrix.
     */
    public static int[][] multiplyByScalar(int scalar, int[][] matrix)
    {
        return null; // TODO: implement
    }

    /**
     * Determines if (first * second) is defined where *
     * indicates matrix multiplication.
     * @return true if matrix multiplication is defined, false otherwise.
     */
    public static boolean multipliable(int[][] first, int[][] second)
    {
        return false; // TODO: implement
    }
    
    /**
     * Multiplies the specified row of first by the specified column of second.
     * Precondition: first[row].length > 0 && first[row].length == second.length
     * @return the result of multiplying the specified row and column.
     */
    public static int multiply(int[][] first, int row, int[][] second, int col)
    {
        return -1; // TODO: implement
    }

    /**
     * Performs (first * second) where * indicates matrix multiplication.
     * Precondition: multipliable(first, second)
     * @return the result of first * second.
     */
    public static int[][] multiply(int[][] first, int[][] second)
    {
        return null; // TODO: implement
    }
}
