Outcomes Addressed
ProcedureYou are to explore the impact of selecting various data structures on the exectution time of various operations. You will need to write very little code. Instead, the focus of this assignment is on the analysis of the benchmarking results. ContainersYou should compare the following containers: ArrayList<Integer>, SortedArrayList<Integer> (found here), and LinkedList<Integer>. All of these containers implement the List<Integer> interface. OperationsYou should compare the time it takes to complete the following operations on each container type:
Size of NYou should run all of the tests for a number of values of N. The size of N and the number of specific values of N that you choose to test should be selected so that you are able to accurately predict the growth rate of the operations under examination. Provided ClassesTo help get you started, three classes have been provided:
Create an Eclipse project and add these classes to your project. No other classes are needed. AssignmentYou must run all of the tests for a number of values of N. The version of the Driver class available for download just runs test for the ArrayList class. You will need to modify the Driver class in order to test the other collections and vary the value of N. Pick a sufficient range of values for N so that you are able to accurately predict the growth rate of the operations being tested. At a minimum, N should include the range of values from 1 to 100,000. Please note that SortedArrayList class does not support adding elements to the front of the collection, so you'll need to modify the Driver class to skip that test when working with the SortedArrayList. Be aware that you may need to allocate a sufficient (think several hours) for the program to run to completion for certain collection classes. Report demo (due 7:00pm, Monday of week 3 (9/22))You must demonstrate that you can view and edit (place your names in the author positions) the Here lab report template file for this assignment. Lab report (due 4:00pm, Friday of week 3 (9/26))Here is a template file to use as a starting point for this report. Your report should include:
As with any report you submit, correct spelling and grammar are required. In addition, your report should be submitted electronically following the Electronic submission guidelines. (You may wish to consult the XML help video and/or sample report before submitting your report.) Be sure to keep copies of all your files, in case something gets lost. If you have any questions, consult your professor. |