CS1321 Fall AY2002 Homework 9 Due via Webwork before 6 a.m. Thursday, Sept. 27, 2001 Note: Webwork will stop accepting this homework at that time - Turn it in well BEFORE then. No late homework is accepted. ___________________________________________________________________________ =x%=x%=x%=x%=x%=x%=x%=x%=x%=x%=x%=x%=x%=x%=x%=x%=x%=x%=x%=x%=x%=x%=x%=x%=x% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Instructions: TURN IN THIS ASSIGNMENT USING WEBWORK!!! Do this homework using DrScheme. At the top of your file, include the student info portion of the HW Skeleton (Name, GT Number, HW, Course, Instructor, Lecture Time). 1. Problem 12.2.2. Assume that the list of numbers you are searching is already sorted in descending order. (Descending: Sorted from largest number down to smallest number.) The number you search for (the target) may or may not be in the list. If the target is in the list, then make your search stop searching when the target is found, i.e., do not let your search continue to the end of the list. When the target is not in the list, your search should search only as far as necessary to determine that the number evidently is not in the list - take advantage of the fact the list is sorted in descending order! (Do not just blindly search all the way to the end!) For each of the problems above, follow the HW skeleton and proper Design Recipe. Part of the assignment is to determine whether the template portion of the recipe is required. Be sure to use an adequate number of test cases and examples. Hint, be sure to think seriously about your test cases. One obvious test you should always include unless your problem actually says that it cannot occur, is testing by passing the empty list as a parameter to your list processing function. Test using many different lists structured in ways so that all categories of lists are indeed tested.