CPSC 170 Sub Post Lab 5
Bubble Sort
Due Before Class on Friday, February 17th

The post lab 5 assignment involves creating a graphical illustration of multiple sort algorithms. In addition to selection and insertion sort, it will also illustrate bubble sort. So, for this sub post lab assignment you will add bubble sort to the ArrayList class that you crated in lab. The file ArrayList.java contains the list implementation from lab. The ArrayList class has a method bubbleSort that you should complete so that it implements the bubble sort algorithm. The bubble sort algorithm consists of multiple passes over the array. In each pass, all neighboring pairs of elements from lowest to highest are swapped if they are not in-order. Also test your code paying special attention to special cases like empty lists and lists that contain null.

Submission: Submit your code as a zip file with your name as the zip file name on the course Inquire site.