---+Sorting: Internally and Externally As the amount of data we handle keeps getting larger, standard in memory sorts that are O(n^2) are not longer acceptable. We need them faster and we need sorts that can deal with more data that can be stored in internal memory at one time. This lab is designed to look into both of those issues ---++ Objectives 1. Do the design independently 1. Learn and implement the merge sort 1. Learn and implement an external sort 1. Adapt your programs to report the amount of work ---++ Assignment Phase 1: 1. Design a class called <b>DataGroup</b> that can hold up to 10,000 pieces of data. I will provide a number of data files with a large amount of data. We only care about parts 0, 4, 6, 8, and 9 of each record. You may want to create another class for the data itself a. This class should implement the merge sort on its data and track the number of compares and copies whenever it is called upon to sort. a. The data read in might not use the entire array. 1. Design another class called <b>BigData</b> that can sort more data than can fit in memory using the method covered in class a. This class should report back the number of reads and number of writes (each divided by 5) done by the program. 1. Develop a testing plan that will sufficiently show the amount of work (Big O) for each of your sorting methods. 1. Turn in the software design report as a pdf by the due date specified on Canvas. Phase 2: 1. Implement your designs 1. Run your working programs on enough data to demonstrate their Big O 1. In a second section of your testing report, demonstrate that your Big O estimates are correct. ---++ Submission instructions for Phase 2 1. Complete the SDR. 1. Combine your SDR and all of your .java and testing files into one zip folder 1. Submit the zip folder on Canvas by the due data specific there. ---++ Restrictions: * You may not use any Internet resources (other than to look up Java syntax). * You may use code from this course or last semesters. * You may not use any online code for any part of the sorting ---++ Challenges * Learn and implement the heap sort (just using your textbook) for an internal sort.
This topic: CenterForComputing
>
WebHome
>
SyllabiFall2022
>
CSC122SylF2022
>
CSC122F2022Lab4SortInEx
Topic revision: r2 - 2022-08-23 - cathybareiss
Copyright © 2008-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback