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:
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:
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.VisualDataSet
class that inherits from our DataSet
class, but overrides the display
method to produce a visual representation of itself using the picture
module. If all goes well, substituting the VisualDataSet
for the DataSet
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 between VisualDataSet
and DataSet
.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.
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.