CSC 160 Fall 2013 - Homework 9 (100 points)
Assigned Nov 4 & 6, due Mon Nov 11

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 HW6, 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.


Assigned M 11/4
Textbook Reading (to review today's class):
  • 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)

    Textbook Reading (to prepare for next class):
  • Study Sec. 7.7, Ch. 9, and Sec. 11.1-11.4 for Wednesday's quiz.
  • Read Sections 11.5-11.7 and Chapter 12 of the textbook.


    Assigned W 11/6
    Textbook Reading (to review today's class):
  • Read Section 11.5 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.
    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 auxiliary functions, you need to show the steps of the Design Recipe for each of the auxiliary 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 of your choice for auxiliary 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.

  • Textbook Reading (to prepare for next class):
  • Read Sections 11.6-11.7, 12, and 13.1-13.5 of the textbook.


    Submitting your Assignment
    You are required to submit this assignment in a single Definitions Pane and a single Interactions Pane through Moodle. Points will be deducted for completing the assignment with multiple Definitions and/or Interactions Panes.

    Be sure to include your first and last name as a comment in the first line of both your Definitions Pane and Interactions Pane.

    The file name for the Definitions Pane needs to be "hw9[LastName]Def.rkt" where:
  • [LastName] is replaced with your last name.
  • For example, if I were submitting this assignment, I would name the file "hw9WittensteinDef.rkt".

    Similarly, the file name for the Interactions Pane needs to be "hw9[LastName]Int.rkt". The Interactions Pane must include testing for EACH function.

    If these filenames are not used, points will be deducted from the assignment grade.


    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: 11/6/13