Question: Write a java program that takes the numbers in 2 sorted files and merges them into a third. The program must merge the files. not

Write a java program that takes the numbers in 2 sorted files and merges them into a third.
The program must merge the files. not input the 2 files into 1 big array, and sort them --so that the numbers in the output file are sorted
Input the file names, and be sure to check the file exists. no need to check if the output file exists, only the 2 input files
after the merge is complete
read the numbers from the output file and print them to the screen
note--either of the 2 input files may have more numbers than the other
extra credit
HEC
You may use 1 dimensional arrays for the extra credit. You are on your own if you do it. It can be done without arrays, using extra file(s)
the numbers in the 2 original files are not sorted, so they must be input and sorted first. Then output them back to the original files and then follow the project instructions

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 Programming Questions!