Posts

Showing posts with the label Double Array

CS3401 Assignment 2

Homework Assignment #2 Exercise #1 Write an implementation of a generic version of the Sorting.java class and its methods. Modify the SortingDriver.java program so that it also test comparisons of Integers and Dates , along with comparisons of Strings . Your Sorting methods should have the following headers: public static <E extends Comparable<E>> void selectionSort(E[] list) public static <E extends Comparable<E>> void insertionSort(E[] list) Exercise #2 Implement a program called MaxRandomNumber.java that creates a 5x5 two dimensional array of Integers , and then fills it with random numbers from 0 to 1000, and then sends this array to the generic max() method which returns the maximum value in the array. Have your main() method print out the numbers in the 5x5 array on 5 separate lines with the 5 Integers from each row on their own line. And then print the maximum number r...