This project has a number of features rarely seen in similar tools.
The user may vary the detail level of the algorithm in order to see only the data structure operations that they desire. For example, a beginning user may wish to see every comparison that happens during a Binary Search Tree insert operation, while another user may not want to see this data and instead only see the result of the insert operation. DsCats allows the user to switch detail levels at any point.
The interface is easy for most users to figure out (it resembles a VCR). The buttons that are not data structure related are Rewind, Play, Pause, Stop, and Fast Forward. The user may move forward and backwards at their own pace through the “data structure animation movie”. There is also a progress bar so that the user may see how far along in the animation they are. The user may jump to any point in the animation process by clicking that place on the progress bar.
The tool is not limited to using “small” data sets. The tool may easily use trees with over 250 elements, which is more than enough for most classroom uses. If it is not possible to show the data elements in a reasonable amount of detail for a large tree, the user may click on a node to view the tree as though the selected node is the root. This process may be repeated to view a tree of any size. Viewing the tree from a different perspective does not hamper the tool’s functionality. For example, the user may play the animation from an alternate viewpoint to focus on that portion of the tree.
The code for the program is written in Java in a way that makes it easily modifiable and expandable. In order to add a new data structure, the programmer needs only to add a new class that extends the existing DataStructure class and then add a few lines of code in one of the existing MainWindow.java file (to add the new data structure into the menu). The code is well documented by comments as well as a separate Programmer Manual that describes the existing code and how to add a new data structure.
As of version 2.0, the data structures implemented are Binary Tree, AVL Tree, and B-Tree. The user may select the data structure that they wish to use and then click on the buttons on the GUI that perform the desired action (for example INSERT or DELETE). Each data structure has its own options and features. For example, you can choose how the delete function works on a Binary Tree (predecessor, successor, alternating or random selection) or use a "Statistics" option on the B-Tree to see how many comparisons have occured, the number of internal nodes, and other useful statistical information.
The program has input files with "understandable" commands such as INSERT 40 to insert the number 40 into the data structure. The input language allows the use of comments in the file to explain the purpose of the data/operations. All of the options (including the data structure specific options) are controllable from the input file.
If you do not want to create the data files by hand, you may simply click on the appropriate options in the GUI and then "save" the input file (under the file menu). This allows the user to create input files without having to create an input file by hand or understand how the input files work.
This project is also useful for presentations to classrooms, at conferences, or other settings. The demonstrator may prepare an input file ahead of time and then simply play it during the presentation. The demonstrator may put "Pause" statements in the input file and the action will automatically wait for the demonstrator's response before moving on.
The demonstrator may also put notes in the input file that will be displayed at the time of the display so that the audience may look at the display and read the notes. This is especially useful for a teacher who wants to make their class notes available to the students. The students can play back the animation and read the notes as many times as is desired on their own by using the instructor's input file.
One final feature is the ability for the user to change the data set at any point of the animation. This allows a student to speculate as to what would happen in the course of the animations if they changed some steps of the animation. Lecturers may also use this ability to demonstrate the answer to questions in mid-lecture.