Implement the following class (ArrayOperations.java):
ArrayOperations
+ main(args: String[]) : void
+arrayGenerator(size: int): int[]
+arrayStats(arr: int[]): int[]
+medianFinder(arr: int[]): int
+doubleArray(arr: int[]): int[]
+findDifferentElements(arr1: int[], arr2: int[]): void
Details:
• arrayGenerator() generates an array with random integers between 1-10, with a given size.
• arrayStats() returns the lowest and greatest values, in an array.
• medianFinder() sorts the array, and returns the median value (note that if the array has an even size, the
median will be the mean of the middle two elements).
• doubleArray() returns an array where each element is doubled (i.e., for [1, 2, 3], it will return [2, 4, 6])
• findDifferentElements() compares two arrays and prints out the index numbers where two arrays have
different elements (i.e., for [4,5] & [4,6], it will print out "Index: 2")
In the main method:
• Ask the user what should be the size of the two arrays.
• Using arrayStats(), print the statistics of the array.
• Using findDifferentElements(), print out the index numbers where two arrays have different elements.
• Using doubleArray(), create a new array (array3).