CSC 160 Spring 2014 - Homework 4 (50 points)
Assigned Mar 3, due MON Mar 10
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, you must contact
the instructor or course tutor prior to starting the assigned exercises.
[30 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 "ch4[LastName]Paper".
[20 pts.] Chapter 4C
Read Sections 4.6-4.10 of the textbook.
Do the following exercises on paper:
4.6.3a: drawing a box diagram for your solution to
4.2.1 (if you didn't do 4.2.1 or got it wrong, use the function definition that will be given for 4.2.1 in the HW3 solutions on Moodle)
4.6.3c: drawing a box diagram for your solution to
4.2.4 (if you didn't do 4.2.4 or got it wrong, use the function definition that will be given for 4.2.4 in the HW3 solutions on Moodle)
Submit on paper in class by the due date OR on Moodle with the filename "ch4[LastName]Box".
GRADING |
Question |
Point Value |
4.3.2a |
10 |
4.3.2c |
10 |
4.4.1b |
10 |
4.6.3a |
10 |
4.6.3c |
10 |
Total |
50 |
Last Modified: 3/9/14