CSC 160 Fall 2012 - CW6
Assigned M 11/26, Due Same Day at 11:55pm
You can either show me the work at the end of class or you need to submit
one copy of your Definitions Pane and one copy of
your Interactions Pane through
Moodle with the filenames "cw6[LastNames]Def.rkt" and
"cw6[LastNames]Int.rkt", where [LastName] is replaced by your last name
and your name appears as a comment at the
top of the Definitions pane.
The Assignment
[20 pts.] Use the Design Recipe v2 to develop a function respond
which recognizes
any one of the strings "Good Morning", "Good Evening", or "How are you?"
and returns either "I want to hit snooze.", "I want to hit snooze.", or "I
am good!", respectively. Make sure your program follows these
requirements:
Include an else statement with an appropriate answer
expression.
Use string-ci=? so that your function is not case
sensitive.
Write at least 5 examples:
--one for each of the 4 question-answer pairs
--one to test case independence, like (respond "good
morning"), to make
sure it gives the same result as (respond "Good Morning")
Last Modified: 11/26/12