Question: Note: According to the question, please write source code in java only using the class method. Sample Run (output) should be the same as displayed
Note: According to the question, please write source code in java only using the class method. Sample Run (output) should be the same as displayed in the question below. Make sure the source code is working properly and no errors.

Exercise #3 : Design and implement a program (name it ArrayMethods), that defines 4 methods as follows: int arraxMax (intll arz) returns the maximum value in the an array int arrayMin(intil arr) returns the minimum value in an array void arrayScuared(intil arr) changes every value in the array to its square (value2) void arrayReverse(int[l arr) reverses the array (for example: array storing 7 8 9 becomes 9 8 7 The program main method creates a single-dimensional array of length 5 elements and initialize it with random integers between 1 and 100. The program displays the original array, then calls each of the above methods and displays their results as shown below. Document your code and organized your output following these sample runs Sample run 1: priginal array: 3, 5, 2, 6, 1 Max value Min value: Squared array: Reversed array: 1, 36, 4, 25, 9 Sample run 2: 1 9, 25, 4, 36, 1 Original array: 3, 2, 3, 7, 2 Max value Min value: Squared array: Reversed array: 4, 49, 9, 4, 9 Sample run 3: 2 9, 4, 9, 49, 4 Original array: 2, 2, 2, 2, 2 Max value Min value: Squared array: Reversed array: 4, 4, 4, 4, 4 2 2 4, 4, 4, 4, 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
