Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started