Question: hi can you please help me write this code in java please. here is the prompt. Complete the two methods in the given program. 6.1

hi can you please help me write this code in java please. here is the prompt.

hi can you please help me write this code in java please.

Complete the two methods in the given program. 6.1 Write a method int[] copy (int[] a) that returns a copy of the array a. To do this, you will need to create a new array of the same length as a. Then, copy each element in a to the new array. Last, return the new array which contains the same elements as the array a. 6.2 Write a method double median(int[] a) that returns the median. A median is the middle value of a data set. First, you will need to sort the array using Arrays.sort (a). If the length of the array is even, there are two middle values so median is the average of the two values in the middle

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!