Overview
The Goal
Now that you’re warmed up, we’re ready to begin building our sorting visualizer. Here’s an example of what it will look like when we’re finished:

Example Goal: Selection Sort Visualization
The Plan
Getting this working will take some time and effort. To help make it manageable, we’ll break the project up into the following high-level steps:
- Create a
DataSet
class to contain the data we’re going to sort. At first, to keep things simple, there will be no visual component other than the text output in the terminal. Once we have some basic functionality in place we’ll come back to add the graphics. - Get our text-based visualization working for Selection Sort and Insertion Sort.
- Add a looping menu that allows the user to choose which sort they would like to run.
- Create a
VisualDataSet
class that inherits from ourDataSet
class, but overrides thedisplay
method to produce a visual representation of itself using thepicture
module. If all goes well, substituting theVisualDataSet
for theDataSet
class should result in a working graphical visualization like the one shown above. At this point we’ll add a menu option to allow the user to choose betweenVisualDataSet
andDataSet
. - Finally, we’ll implement Bubble Sort and add this to our menu.
The steps above will take you to the end of the required part of the lab. Once they are complete, you’ll have a program that allows the user to choose between text-based and graphical visualizations of 3 classic sorting algorithms.
Extra Credit
In keeping with CSCI 150 tradition, there are extra credit opportunities available once you’ve completed the required steps above. The various options are described in the Extra Credit page before the Wrap Up.