CSC 160 Fall 2006 - Homework 8
Assigned Nov 30, due Tuesday Dec 12

Note: Any assignment received after Tuesday 12/12 at 11:59pm will receive a grade of zero!

Complete this Log Sheet, according to the directions in PSP Chapter 3.


Directions
  • Read these directions carefully before starting the assignment.
  • Please complete this assignment using the Simply Scheme mode of DrScheme.
  • The assignment may be done alone or in pairs using the ideas in the Pair Programming article.
  • You cannot pair up with the same person more than once during the semester.
  • For each function, be sure to follow the new design recipe (incorporating Conditional Functions) that was given in class on Thursday 11/30.
  • If you are defining auxiliary functions, you need to show the 6 steps of the Design Recipe for each of the auxiliary functions, as well as the 6 steps of the Design Recipe for the main (or primary) function.
  • Use these directions for how to submit your assignments.
  • If you do not fully understand any of the directions above or the questions below, please e-mail me as soon as possible.


    Programs
    1) At Exit 17, the speed limit on the Southern State Parkway is 55 mph. Develop a function named radar which takes someone's speed in mph and returns one of the following sentences: '(under limit), '(at limit), or '(over limit), based on that person's speed.

    2) Develop the function describe-temp, which consumes a Fahrenheit temperature and returns 'Warm if the temperature is 80 or greater, 'Mild if the temperature is between 60 and 80 (including 60), and 'Cold if the temperature is below 60.

    3) Exercise 4.4.2a in How to Design Programs. (Develop the function tax, which consumes the gross pay and produces the amount of tax owed. For a gross pay of $240 or less, the tax is 0%; for over $240 and $480 or less, the tax rate is 15%; and for any pay over $480, the tax rate is 28%.)

    4) EXTRA CREDIT: Exercise 5.1.5 in How to Design Programs. In the question, replace 'OneColorAtCorrectPosition with '(One Color At Correct Position), 'OneColorOccurs with '(One Color Occurs), and 'NothingCorrect with '(Nothing Correct).


    Grading Purpose Contract Data Analysis Examples Skeleton Template Definition Testing
    Question 1 /3 /3 /2 /3 /3 /3 /10 /3
    Question 2 /3 /3 /2 /3 /3 /3 /10 /3
    Question 3 /3 /3 /2 /3 /3 /3 /10 /3
    EXTRA CREDIT /1 /1 /1 /3 /1 /1 /10 /2
    Log /10



    Last Modified: 12/5/06