Write a program Concat.java that take 6 files as inputs, concatenates them together, and puts the output into a file called Output.txt. Use Cat2.java and your text as a guide, and Files File1.txt, File2.txt ….etc.. as input files.
Write a program FourSum.java that reads ints from a file, and counts the number of 4-tuples that sum to zero. Use a quadruple nested loop. What is the order of growth of the running time of your program? Estimate the largest input size that your program can handle in 5 minutes. Then, run your program to validate your hypothesis. Use the Doubling approach as we did in class.
Upload your program, your order of growth, and estimate of largest input size.
HINT: The running time for this program is long. Modify 1Kints.txt to get (4) input files – i.e. 512 ints will take about 10 seconds.
Write a Bubble sort routine as covered in class. Go through the array from right to left when analyzing values as we did in class. with the output sorted from lowest to highest. You are free to evaluate Bubble Sort routines from anywhere, but you need to write this yourself, don’t just copy and hand in a program. Time your program using Stopwatch, using ThreeSum.java as an example. Use input files 4Kints, 8Kints, 16Kints, 32Kints, and 64Kints as input files. Use the doubling method we did in Assn. 12 to approximate the Order of your BubbleSort.
Upload: Your commented java code, times, doubling ratios, and your estimate of the Order.
Do a similar analysis for Insertion Sort, but use Insertion.java from Blackboard.
Time your program using Stopwatch, using ThreeSum.java as an example. Use input files 4Kints, 8Kints, 16Kints, 32Kints, and 64Kints as input files. Use the same doubling method we did in Assn. 12 &13 to approximate the Order of your Insertion Sort.
Upload: The Insertion java code, times, doubling ratios, and your estimate of the Order.