CSC 160 Spring 2006 - Homework 9
Assigned April 27, due SUNDAY May 7


Read Chapter 4 and Chapter 5 of the textbook.

Submitting this Assignment
--For each function, be sure to follow the new design recipe (incorporating Conditional Functions) that was given in class on Tuesday 4/25. Write all the function purposes, contracts, data analyses, examples, skeletons, templates, and function definitions in the same Definitions Window. Save as hw9LastNameDef.scm.
--Also test each program. Save the resulting Interactions window as hw9LastNameTest.scm.
--For full credit, you must send exactly two files, one Definitions Window file and one Interactions Window file.
--Send both of the files in an email to Wittenstein@adelphi.edu. Be sure to include your name!


The Assignment
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 symbols: "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, and "Cold" if the temperature is below 60.

3) [Exercise 4.4.2a] 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 the online textbook.



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 /20 /3
EXTRA CREDIT /2 /2 /2 /3 /2 /2 /15 /2



Last Modified: 4/27/06