CSC 160 Fall 2014 - Homework 8 (100 points)
Assigned Oct 27, due Mon Nov 3

1) Assignments with time stamps during class time (Mon or Wed 4:15-5:30pm) will be given a grade of ZERO.
2) In the spirit of the pair programming article that you read and summarized in HW5, this week's homework assignment may be done in pairs. If you choose to work in pairs, you must find time outside of class to work together in person at one computer. As per the syllabus, you cannot "pair-off" with the same person more than once during the semester. If you choose to do the assignment in pairs, please submit one copy through Moodle where both last names are used in each file name and both names appear as a comment at the top of each pane (Definitions and Interactions).
3) Start this homework as soon as possible so that you have time to get any help you may need from the instructor or course tutor prior to when the assignment is due.
4) Do not start the exercises until to have fully read and fully understood the corresponding textbook sections. If there is something you do not fully understand, you must contact the instructor or course tutor prior to starting the assigned exercises.


[60 pts.]Chapter 11A
  • Read Sections 11.1-11.4 of the textbook.

    Do the following exercises from the textbook in DrRacket:
  • Exercises 7.7.15 and 7.7.16 from the textbook.
  • Exercise 7.7.17 from the textbook. (For full credit, your function definition for 7.7.17 must call the functions you defined in 7.7.15 and 7.7.16)

    Save the Definitions Pane to your computer or flash drive with the filename "hw8[LastName]Def.rkt". Do not submit this file yet as you will continue working in the same file for the next part of this assignment!

    Save your Interactions Pane with the testing for all three exercises (7.7.15, 7.7.16, and 7.7.17) with the filename "hw8LASTNAMEint1.rkt". (Note: Since the Interactions Pane can not be modified after it is saved, you need to submit a separate Interactions Pane for the next part of the homework.)


    [40 pts.]Chapter 11B
    Read Section 11.5-11.7 of the textbook.

    Do the following exercise from the textbook in DrRacket:
  • Exercise 11.3.5 from the textbook. Make sure to read the hint in the textbook AND the directions below:
    Directions for 11.3.5: Read these directions carefully before starting the assignment.
  • Whenever defining a Racket function, you must show the first five steps of the Design Recipe introduced in Chapter 5 in the Definitions Pane, as well as Testing in the Interactions Pane.
  • If you are defining helper functions, you need to show the steps of the Design Recipe for each of the helper functions, as well as the steps of the Design Recipe for the assigned function.
  • When writing a program, the name of the assigned function is the name of the program. Use sensible names when naming your helper functions.
  • If a helper function is not predefined, but you have seen it written before (e.g. in class, on a reading assignment, or on a previous programming assignment), just copy the function definition (no contract, skeleton, etc.) into the top of your Definitions Pane.
  • For the given exercise, to receive full credit, you must design and use at least one helper function.
  • If you do not fully understand any of these directions, please e-mail me as soon as possible.

  • Submit your Definitions Pane (containing all of HW8) with the filename "hw8LASTNAMEdef.rkt".

    Submit your Interactions Pane (containing only Exercise 11.3.5) with the filename "hw8LASTNAMEint2.rkt".


    Grading Contracts Purposes Examples Skeletons Inventories Definitions Function Re-Use Testing
    Exercise 7.7.15 (18 pts.) /2 /1 /3 /1 /1 /8 /2
    Exercise 7.7.16 (18 pts.) /2 /1 /3 /1 /1 /8 /2
    Exercise 7.7.17 (24 pts.) /2 /1 /3 /1 /1 /8 /6 /2
    Exercise 11.3.5 (40 pts.) /4 /2 /6 /2 /2 /10 /10 /4


    Last Modified: 10/23/14