CSci 1301: Problem Set 2

Due: Friday, September 28 at 11:59pm by e-mail

Please test all your programs carefully and include all the test cases with your program. You must have at least 3 check-expect tests for each function.

Problem 1, 5 points

Finish the function first-letter-A-or-a? in the in-class example so that it returns #false for an empty string, and all the other tests are still passing.

Problem 2

Read the step-by-step design process in section 3.1. Note that we write our examples as check-expects rather than in comments. Also note that we have skipped writing a stub for simple fucntions (you would want to do it for more complex ones when you are less certain about what may go into the expression in the function).

Exercises 36 (5 points), 37 (5 points), 38 (5 points). Make sure to follow all steps of the design recipe, phrase your "expected cases" as check-expect tests. Don't worry about an empty string for exercises 37 and 38 (but make sure that your signature is clear about expected data).

How to submit

Make sure that your file is named correctly:
Name your file with the combination of your last names, no spaces, followed by "PS" (for "Problem set" and the problem set number. For instance, if your last names are Smith and Lee, the file name should be SmithLeePS2.rkt If there are others in the class with the same name as yours, you your initial in addition to your last name: MSmithJLeePS2.rkt

At least one person in the group must submit it via canvas as a file upload (make sure it's that .rkt file). Make a comment indicating who you worked with. The other person (or people) in the group must either submit the same file and also indicate who was in the group, or just make a comment listing all your group members (note: if you don't submit a note listing your group members, your work may not be counted, even if your group partners list you as the group member).


CSci 1301 course web site.