Question: 1. (90 points) In this assignment, you will be implementing an algorithm to merge two individually sorted files. Write a program, MergeSortedNumbers.java, that asks the

 1. (90 points) In this assignment, you will be implementing an

1. (90 points) In this assignment, you will be implementing an algorithm to merge two individually sorted files. Write a program, MergeSortedNumbers.java, that asks the user to enter the location of two files. Create a method public static double[] readNums String file to read numbers from a file and store it in an array Create another method public static double[ mergeSort (double [1 arrl, double [1 arr2 to merge the two arrays so that the final array is sorted Finally, create method public static void writenumbers (String filepath, double mergeArray) to save the numbers to a destination file Assume that the numbers in each individual file are sorted. Now create a new array as the combination of the two arrays in a way that all the numbers are sorted

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!