CSci 1301: Problem Set 2

Due: Friday, September 15 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).

To submit the problem set, send me all your Racket files as e-mail attachments. My e-mail is elenam at morris.umn.edu. Please use "1301 Problem set 2" followed by your initials or your name as the subject of your e-mail.


CSci 1301 course web site.

The views and opinions expressed in this page are strictly those of the page author. The contents of this page have not been reviewed or approved by the University of Minnesota.