Comp 212 Extra-Credit Homework 
Sort Animation

Due Friday Dec.01, 2000 11:59 PM.

This homework exercise serves as an exercise on sorting and animation.  It is based on the sorting animation example shown in the lecture and in lab 10.   This homework is completely optional and is worth an extra-credit of 10 points to be added to your lowest exam score.  However, the resulting score shall not exceed 100.  So, for example, if your lowest score is a 99, then you will only get 100 points maximum.  Since this is an optional extra-credit programming exercise, there will be no extension on it.

Problem Statement

Study the given MVC design and implementation of a GUI application for animating the sorting of an array of integers.  You are free to use the given code and modify it in any way you see fit to carry out the following tasks.  You must describe and explain any change you make to the given code.

  1. Write the necessary code to add a radio button to the GUI to allow the user to select heap sort for sorting and animation.  You will need to override the init() method in HeapSorter in order to properly heapify the given array.
  2. Write the code to add a group of three radio buttons to allow the user to select animation using "dots", or animation using vertical "bars" as shown in the lecture, or animation using horizontal bars.  These radio buttons must be enabled during sorting, so that you can dynamically switch the animation command dynamically at run-time.
  3. Document clearly the responsibilties for each class in your design.  In the README file, explain clearly in your own words how these classes cooperate with each other to get the job done.

Submission

The homework is due Friday Dec.01, 2000 11:59 PM.  It is to be submitted electronically.  No late submission will be accepted.  The complete homework set should contain the following:


dxnguyen@cs.rice.edu         Please let us know of any broken links             Revised Nov. 20, 2000