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



CS110: Assignment 12 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 [] arrl , double[ arr2) to merge the two arrays so that the final array is sorted Finally, create method public static void writenumbers (String filepath, doublell 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 allthe numbers are sorted
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
