CSC 160 Fall 2014 - Homework 4 (100 points)
Assigned Sept 29, due MON Oct 6
1) Assignments submitted on Moodle with time stamps during
class time (Mon or Wed 4:15-5:30pm) will be given a grade of ZERO.
2) 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.
3) 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 in the textbook section, you must contact
the instructor or course tutor before starting the assigned exercises.
[50 pts.] Chapter 4A
Read Sections 4.1-4.2 of the textbook.
Do the following exercises in DrRacket. For each exercise, you must
include at least three test cases with expected answers in quotation marks:
4.2.1: vert-mirror-image
4.2.4: surround
Save one Definitions Pane containing both 4.2.1 and 4.2.4 to your computer or flash drive with the filename "ch4aLASTNAMEdef.rkt".
Save one Interactions Pane containing both 4.2.1 and 4.2.4 to your computer or flash drive with the filename "ch4aLASTNAMEint.rkt".
Upload the file to Moodle, using the link for HW4. (Do not click Send for Marking yet,
in case you want to upload the "paper" parts of this assignment below!)
[50 pts.] Chapter 4B
Read Sections 4.3-4.4 of the textbook.
Do the following exercises on paper. For assistance, refer to the 4.3-4.4 PowerPoint Slides on Moodle, which contain the answers to similar problems:
4.3.2a: Consider the solution and test cases for HW3's Exercise 4.2.1 (vert-mirror-image):
What words are used as parameters to what functions? What words (and expressions) are used as arguments to which functions?
4.3.2c: Consider the solution and test cases for HW3's Exercise 4.2.4 (surround):
What words are used as parameters to what functions? What words (and expressions) are used as arguments to which functions?
4.4.1b: Type in the definition for the
mystery
function given in Exercise 4.3.1. Then, for the
function call (mystery ball calendar)
:
A) Write down which argument is matched with
which parameter.
B) Write down the first step that the Stepper
would do. (Then check with the Stepper that you are correct.)
C) Write down the second step (and check with the
Stepper).
D) Continuing until the Stepper is
finished.
Submit on paper in class by the due date OR on Moodle with the filename "ch4bLASTNAMEpaper".
GRADING |
Question |
Point Value |
4.2.1-Def |
20 |
4.2.1-Int |
5 |
4.2.4-Def |
20 |
4.2.4-Int |
5 |
4.3.2a |
15 |
4.3.2c |
15 |
4.4.1b |
20 |
Total |
100 |
Last Modified: 10/1/14