- Provide students with a file that is missing lines for students to fill in in the implementation of the sorting algorithm.
- The program should execute when you give it to the students, but give an incorrect output.
- For this first step, students should be working with a small set of data.
- After students have a working solution with the small set of data, give them a large set of numbers (maybe 10,000) to sort through.
- Tell them their solution must be identical to yours to be correct.
- Use a web resource to get thousands of random numbers. (e.g. www.random.org/integers/)
- This helped avoid having students hard code the solution.
- Below we have solution code for implementing sorting algorithms. Remove some of the implementation and then provide this code to your students.
- Download the file DemonSort.java here.
- Note: File is called "DemonSort" because the school mascot was the Demons.
- The sorting algorithms used in this assignment are:
- insertionSort, selectionSort