

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Title: “Program Assignment 2: Analyzing Sorting Algorithm Performance” Points: 100 points – 60pts for coded portion, 40 points for written analysis Due Date: Wednesday October 23, 2002 Objectives: (1) To reinforce the concepts underlying the asymptotic behavior of several sorting algorithms. (2) Further develop Java programming skills. Description: Create a Java program that produces the necessary data to analyze the asymptotic behavior of three sorting algorithms. Do this according to the steps shown below:
once for each sort (to prove the sort works properly) – if your sorts work properly all of the output should look identical so you don’t need to repeat it.
References: Notes: Lecture Notes for Days 10 & 11 (Sorting) Restrictions: Your source file shall begin with comments containing the following information: / Name: COP 3503H Assignment title: Date: / Input Specification: Internal to the source code. Output Specification: Timing information and any other output produced by your program can be written to the screen for this program. All other information should be included in your write-up. Deliverables: (1) Source code file on a floppy disk with the following information: Your name, COP 3503H, Assignment title, and Date. (2) The write-up for this assignment described in other parts of this document. (3) Place hard copies of (1) and (2) along with your disk in a large envelope, so that you do not need to fold the printouts or your report. CLEARLY, label the envelope with the following information: your name, COP 3503H, Assignment title, and the date. Write-up: A complete write-up is one of the deliverables for this assignment. A separate document (see the course web-site) describes the make-up of this write-up. Along with the items described in that separate document you will need to include the analysis described above in your report. Additional Information: Shown below is a segment of code that will be helpful in constructing random permutations. Random permutation public static final void permute( Object [ ] myarray ) { Random r = new Random( ); for (int i = 1; i < myarray.length; i++) swapElements (myarray, i, r.nextInt(0, i)); } Timing Just as in Program # Page 2