Computer Science 15-100 (Sections S-V), Fall 2008
Homework 7b:  Bonus/Optional
Optionally Due:  Thu 23-Oct-2008 at 11:59pm (email copy)


This entire assignment is bonus/optional.

The due date is really just a suggestion.  Being bonus, late submissions will be accepted up until the last day of classes.


Read these instructions first!


For this bonus hw, you may do any/all of the following.  Keep a timesheet, as always.

1)  Do any bonus project that you have not yet attempted from the previous hw assignments. 

2)  Write a game besides the ones we’ve done so far, and besides Tetris (which we’ll soon be doing).  Be creative.   Have fun!

3)  (And we sure hope some of you choose this option, since pedagogically it’s very compelling!)

Write your own sorting simulator, based on David Eck’s great simulator: 

http://kosbie.net/cmu/fall-08/15-100/handouts/xSortLab.html

You do not have to write all the sorts to get bonus.  Just write one to start.  Then, as your time allows, add more. 

But you should make the sorts work “step-wise”, so you can move step-by-step through them.

Hint:  I think the easiest way to do this is to first run the sort entirely, and to store in arrays the steps – one array can indicate on each step if it’s a comparison or a swap, and another array can store the “from” index, and a third array can store the “to” index.  Then the “step” you are on is in fact the INDEX into these arrays, telling your simulation how to handle that step in accordance with the algorithm.  See?  If not, think about it…

Of course, you do not have to follow that hint, and can do this however you wish.  Just be sure not to look at code (including David Eck’s!) that does this!

Have fun!!!!
 


Carpe diem!