CSC 171
Homework 6

Assigned Mar 17, due Mar 24

This assignment will involve the material of chapters 14-19: lists of lists, multiple lists, local definitions, and generalizing functions.

This assignment may be done in pairs, following the principles of Pair Programming. Turn in one assignment with both students' names on it.

Programming

For all the programming assignments, be sure to follow the design recipe. Write your function contract, examples, and function definition in the Definitions Window, save it to a file, and e-mail me this file. Also test your program: since you've already included examples in the Definitions window, you should be able to hit the Run button and see all the results (along with what you said they "should be"). Save the resulting Interactions window to a text file and e-mail me this file too. Be sure to choose meaningful names for functions and parameters, and watch for opportunities to re-use functions you, I, or the textbook have already written.

Also turn in a log of how many errors of different kinds you encountered in the assignment, with brief comments describing each one ("mismatched parentheses" is self-explanatory, but more complex errors might need more description). You may do this using the PSP forms, or simply by keeping track in a text file or on paper and turning it in.

Grading standards

Error log:       /30
(I'm not grading on how many or how few errors you encountered, only on whether you recorded them adequately.)

Function name Contract Examples Definition Test runs
arrangements /10 /10 /20 /10
count-ancestors /5 /5 /10 /5
earliest-year /5 /5 /10 /5
eye-colors /5 /5 /10 /5
ftree=? /10 /10 /20 /10
count-descendants in top-down tree /5 /5 /10 /5
Localized version of one of the above /5 /5 /10 /5
cross /5 /5 /10 /5
dot-prod /5 /5 /10 /5
merge /5 /5 /10 /5
intersect /10 /10 /20 /10
do-to-each /5 /5 /10 /5
cube-each /5 /5 /10 /5

General skills:

Following directions /10
Writing contracts from word problems /10
Choosing examples /10
Choosing names /10
Coding /10
Code re-use and function composition /10

Total:         /500


Last modified:
Stephen Bloch / sbloch@adelphi.edu