CSC 160 Fall 2009 - Homework 6
Assigned M 11/2, due MON 11/9 (extended to WED 11/11)


Read Appendix B of the textbook, up to and including B.4.

Read the powerpoint slides on Moodle entitled "Sorting Exercise-Explanation".

Do the following:
  • 1. (50 points) Implement the program described on pages 574-578 of the text.
  • 2. (50 points) Modify the sorting program (sortV3.a2w on Moodle) so it:
        a) sorts lists of numbers from greatest to least
        b) create a second list with 5 numbers of your choice and have my_first_method call putInOrderHighToLow a second time to sort that list
        c) have aliceLiddell or another character recite the second list, after reciting the first list and waiting a second in between (Hint: See page 115-116 on the wait() statement).
  • 3. (Extra Credit: 20 points) Create your own program that uses recursion. For full credit, it should be an original idea of yours, not something similar to the recursive programs described in class or the textbook.


    Submitting your Assignment
  • You must submit one file for each exercise through Moodle.
  • For full credit, the file for the first exercise must be named "hw6[LastName]6.1.a2w" where [LastName] is replaced with your last name. (For example, if I were submitting this assignment, I would name the file "hw6Wittenstein6.1.a2w")
  • Note that you do not type in the .a2w part but it is added in automatically by Alice after you have saved the file.
  • The filename for the other exercises should have the same name except that the 6.1 is changed to the correct exercise number (6.2 or 6.3).



    Last Modified: 11/10/09