CSC 160 Spring 2014 - Homework 7 (100 points)
Assigned Mar 31, due MON Apr 7

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.


[50 pts.] Chapter 7B
Read Sections 7.5-7.7 of the textbook.

Do the following exercises from the textbook in DrRacket and submit all Design Recipe steps:
  • Exercise 7.7.3: circle-perimeter
  • Exercise 7.7.7: hours->minutes

  • Save the Definitions Pane to your computer or flash drive with the filename "hw7[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!


    [50 (+20) pts.] Chapter 9
    Read Chapter 9 of the textbook.

    Do the following exercises from the textbook in DrRacket and submit all Design Recipe steps:
  • Exercise 9.2.2: repeat
  • Exercise 9.2.7: number->image
  • EXTRA CREDIT: Exercise 9.2.6: first-half [Note: For odd-length strings, the result should not include the middle-character. For instance, if the argument is "March", the result should be "Ma", not "Mar".]

    Submit your Definitions Pane with the filename "hw7[LastName]Def.rkt".


    GRADING
    Question Point Value
    7.7.3 (Contract) 3
    7.7.3 (Purpose) 2
    7.7.3 (3 Examples) 3
    7.7.3 (Skeleton) 2
    7.7.3 (Inventory) 3
    7.7.3 (Function Definition) 10
    7.7.3 (Testing/Interactions Pane) 2
    7.7.7 (Contract) 3
    7.7.7 (Purpose) 2
    7.7.7 (3 Examples) 3
    7.7.7 (Skeleton) 2
    7.7.7 (Inventory) 3
    7.7.7 (Function Definition) 10
    7.7.7 (Testing/Interactions Pane) 2
    9.2.2 (Contract) 3
    9.2.2 (Purpose) 2
    9.2.2 (3 Examples) 3
    9.2.2 (Skeleton) 2
    9.2.2 (Inventory) 3
    9.2.2 (Function Definition) 10
    9.2.2 (Testing/Interactions Pane) 2
    9.2.7 (Contract) 3
    9.2.7 (Purpose) 2
    9.2.7 (3 Examples) 3
    9.2.7 (Skeleton) 2
    9.2.7 (Inventory) 3
    9.2.7 (Function Definition) 10
    9.2.7 (Testing/Interactions Pane) 2
    9.2.6 +20
    Total 100 + 20




    Last Modified: 3/31/14