CSC 160 Fall 2012 - Homework 6
Assigned Oct 15 & 17, due MON Oct 22
1) Assignments with time stamps during
class time (Mon or Wed 4:15-5:30pm) will be given a grade of
ZERO.
2) This assignment will not be accepted late for any
reason, as solutions will be posted to Moodle
shortly after midnight on the due date. This is so
you can study the solutions before the Midterm Exam.
3) 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).
Assigned M 10/15:
Textbook Reading (to review today's class):
Read Sections 5.11-5.16 of the textbook.
In DrRacket, for the pinwheel
function:
Copy and paste the correct
answers to HW5 Exercises 5.3.3, 5.8.2, and 5.9.3.
Do Exercise 5.11.2 (Hint: Use the solution to Exercise
1.5.5 from HW1 as a guide to write the expression.)
Do Exercise 5.12.1 (for pinwheel
, using the
test cases written in Exercise 5.4.3)
In DrRacket, for the lollipop
function:
Copy and paste the correct
answers to HW5 Exercises 5.3.7, 5.8.6, and
5.9.7.
Do Exercise 5.11.5
Do Exercise 5.12.1 (for lollipop
, using the
test cases written in Exercise 5.4.7)
In DrRacket, for the diamond
function:
Do Exercise 5.14.1 (Make sure to complete Steps 1-6 of the
Design
Recipe!)
Textbook Reading (to prepare for next class):
Read Sections 7.1-7.6 of the textbook.
Assigned W 10/17:
Textbook Reading (to review today's class):
Read Sections 7.1-7.2 of the textbook.
Do the following exercises in DrRacket:
Exercise 7.2.3 from the textbook.
Additional Exercise: Write a Racket
expression to represent the standard arithmetic expression (3 + 4) *
(7 - 2). (Do not work out the math, just translate it into the
Racket language.)
Textbook Reading (to prepare for next class):
Read Sections 7.3-7.6 of the textbook.
Study Chapters 1-5 and 7 for next week's Midterm
Exam.
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 the Definitions Pane and the Interactions Pane.
The file name for the Definitions Pane needs to
be "hw6[LastName]Def.rkt" where:
[LastName] is replaced with your last name.
For example, if I were submitting this
assignment, I would name the file "hw6WittensteinDef.rkt".
Similarly, the file name for the Interactions Pane needs to be
"hw6[LastName]Int.rkt".
Please let me know if this is not clear or if you are unsure exactly
what filename to use. Up to 5 points will be deducted from the
assignment grade if incorrect filenames are used.
GRADING |
Question |
Point Value |
5.11.2 |
15 |
5.12.1 (pinwheel ) |
5 |
5.11.5 |
15 |
5.12.1 (lollipop ) |
5 |
5.14.1 (contract) |
4 |
5.14.1 (purpose) |
2 |
5.14.1 (examples) |
6 |
5.14.1 (skeleton) |
4 |
5.14.1 (inventory) |
4 |
5.14.1 (fill in body) |
15 |
5.14.1 (testing) |
5 |
7.2.3 |
10 |
Additional |
10 |
Total |
100 |
Last Modified: 10/17/12