Sorting Algorithms - Computer Programming

File Name: Sorting Algorithms - Computer Programming Downloads: 3433
Category: Education and Simulation Uploaded By: Jonathan Kaplan
Created Date: Sep-08-2010 Last Updated Date: Feb-06-2014
Hits: 3657 Hits Released By: Jonathan Kaplan, WonderBuilders LLC
License: GPL v2 + classpath Version & Compatibility : Version: 0.1, Compatibility: v0.5
Contact URL : http://www.wonderbuilders.com/contact
Sorting Algorithms - Computer Programming

This module includes a simple, multi-user Java code editor for experimenting with sorting algorithms. Use the editor to try out different sorting algorithms on 8, 16, or 32 colored spheres.

Once you have installed the module on your Wonderland server, select "Object" from the Insert menu, select "Sorting Demo" from the list, and then click the "Insert" button. You will see a code editor window plus 8 red spheres.

 

Sort-1

 

Right-click on the editor window to "Take Control" of the application. Type in the code for your algorithm, noticing that a bit of the code is already written for you so that you can focus solely on the algorithm.



Sort-4

 

Using the tool palette, you can click on the right arrow tool to step through your code, one line at a time. As you do, you'll notice that cubes indicate which items in the set are being compared or swapped.  Alternately, you can click on the play button to run the sort. You can stop or pause this playback at any time. The randomize tool (second from the right) allows you to create a new random ordering of the objects. Notice that the two fields below the code pane provide information about the highlighted items and also about the overall gets and swaps.

If you wish to sort more than 8 items, click on the gears tool to open the sort settings dialog.



Sort-5

 

These settings also allow you to change the color, size, and spacing of the spheres, as well as randomize the objects.

Try comparing two different sorting algorithms by inserting another copy of the Sort Demo into the world and entering different code. With two people, you can click play at the same time and see which algorithm runs faster.

This module requires that the tooltip component be installed also.

 

Add comment


Security code
Refresh