package saddlePoints;

/**
 * Creates a number of random arrays, and checks each array to see
 * if it contains a saddle point. Prints the arrays and the results.
 *
 * @author PUT YOUR NAME HERE
 * @author PUT YOUR PARTNERS NAME HERE
 */
public class SaddlePoints {

    /**
     * @param args Unused.
     */
    public static void main(String[] args) {
        new SaddlePoints().run();
    }

    /**
     * Creates arrays various sizes (including some 2x2 arrays and some larger),
     * fills them with random values, and prints each array and information about
     * it. Keeps generating arrays until it has printed at least one with and
     * one without a saddle point. 
     */
    void run() {
        
    }
    
    /**
     * Prints the array.
     * 
     * @param array The array to be printed.
     */
    void printArray(int[][] array) {
        
    }

    /**
     * Prints whether the given array has a saddle point, and if so, where it is (row and column)
     * and what its value is. (If there are multiple saddle points, just prints the first.)
     * 
     * @param array The array to be checked.
     */
    void printArrayInfo(int[][] array) {
        
    }
    
    /**
     * Creates and returns an array of the given size and fills it with random
     * values in the specified range.
     *  
     * @param numberOfRows The number of rows desired.
     * @param numberOfColumns The number of columns desired.
     * @param minValue The smallest number allowable in the array.
     * @param maxValue The largest number allowable in the array.
     * @return
     */
    int[][]createRandomArray(int numberOfRows, int numberOfColumns, int minValue, int maxValue) {
        return null;
    }

    /**
     * Finds the largest value in an array of integers.
     *  
     * @param array The array to be searched.
     * @return The largest value in the array.
     */
    int largest(int[] array) {
        return Integer.MIN_VALUE;
    }
   
    /**
     * Finds the smallest value in an array of integers.
     *  
     * @param array The array to be searched.
     * @return The smallest value in the array.
     */
    int smallest(int[] array) {
        return Integer.MAX_VALUE;
    }

    /**
     * Returns an array containing the largest values in each column of the given array.
     * 
     * @param array The array to be searched.
     * @return An array of the largest values in each column.
     */
    int[] largestValues(int[][] array) {
        return null;
    }

    /**
     * Returns an array containing the smallest values in each rpw of the given array.
     * 
     * @param array The array to be searched.
     * @return An array of the smallest values in each row.
     */
    int[] smallestValues(int[][] array) {
        return null;
    }


    /**
     * Returns true if the given array has a saddle point, and false if it does not.
     * 
     * @param array The array to be checked.
     * @return True if the array has a saddle point, else false.
     */
    boolean hasSaddlePoint(int[][] array) {
        return true;
    }

    /**
     * Given an array that is known to have a saddle point, returns the number of a
     * row containing a saddle point. If more than one row contains a saddle point,
     * the first such row will be returned.
     * 
     * @param array An array containing one or more saddle points.
     * @return The lowest-numbered row containing a saddle point.
     */
    int saddlePointRow(int[][] array) {
        return -1;
    }

    /**
     * Given an array that is known to have a saddle point, returns the number of a
     * column containing a saddle point. If more than one column contains a saddle point,
     * the first such column will be returned.
     * 
     * @param array An array containing one or more saddle points.
     * @return The lowest-numbered column containing a saddle point.
     */

    int saddlePointColumn(int[][] array) {
        return -1;
    }
}
