Question: This question is allowed to create Multiple methods, but Median Methods is necessary. THanks Java Problem - calculate the Median You must create a static

This question is allowed to create Multiple methods, but Median Methods is necessary.
THanks
Java Problem - calculate the Median You must create a static method. double getMedian(double[]): This method will receive a 1D array of numbers, make a copy of it, and sort the numbers from the smallest to the largest. Then the method will compute the median and return its value. Do not sort the original array received as a parameter, or you will lose marks. To calculate a median, you will need a sequence of numbers in our case marks) ordered from the smallest to the largest (you can use Arrays.sort to array sorted). you must use ID or 2D Arrays. You CANNOT use ArrayLists or any other List collections. 1. Your program will read the number of the arrays(Scanner) 2. The length of the array is fixed- 3 digits for each array. 3. Enter the arrays one by one and calculate their respective averages. 4. By comparing the average of the array, use the getMedian Method to calculate the median Examplel: Input: 90 95 100 30 12 45 85 80 79 Example2: Input: 6 90 95 100 30 12 45 85 80 79 50 30 10 100 100 100 50 49 80 29.00 Output: Averages: 95.00 81.33 Median: 81.33 Output Averages: 95.00 29.00 -81.33 - 45.00-100.00 59.67 Median: 70.50
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
