CSC 160
Homework 9
Assigned Apr 24, due May 8
The Last Homework Assignment!
Essay (to be done individually)
Re-read the adages page,
and perhaps
this
article on computational thinking for non-computer-scientists.
Choose a group of several related adages, or one
longer article, that mean more to you than they did at the beginning of
the term.
Write an essay of three to six well-structured
paragraphs on what this adage or article really means in practice. Do
you agree
or disagree? Support your claims with specific examples from your
experience this semester.
Programming Problems
Chapter 21: defining new structures
- Exercises 21.1.1 and 21.1.2 (for practice; nothing to turn in)
- Type in Worked Exercise 21.1.3,
make sure it works for you, make some changes to it, and make sure they work.
(nothing to turn in)
- Download
Worked
Exercise 21.2.1,
make sure it works for you, make some changes to it, and make sure they work.
(nothing to turn in)
- Exercises 21.3.3 and 21.3.8 (defining structs).
Be sure that for each struct, you do all the steps of the recipe on p.
274.
- Download
Worked
Exercise 21.4.1,
make sure it works for you, make some changes to it, and make sure they work.
(nothing to turn in)
- Exercises 21.4.10 through 21.4.12 (functions on structs that you
just defined)
- Download
Worked
Exercise 21.5.1,
make sure it works for you, make some changes to it, and make sure they work.
(nothing to turn in)
- Exercises 21.5.3, 21.5.6 (functions returning structs)
- Download
Worked
Exercise 21.6.1,
make sure it works for you, make some changes to it, and make sure they work.
(nothing to turn in)
- Exercise 21.6.2 (animation involving structs)
- Exercise 21.6.3 (animation involving structs)
- Either
Exercise 21.7.5 or
Exercise 21.7.6 (animations involving structs; note the
video of 21.7.5 in
action)
- One of exercises 21.7.7 through 21.7.10
(animations involving structs; more than one is extra credit)
- Download
Worked
Exercise 21.8.1,
make sure it works for you, make some changes to it, and make sure they work.
(nothing to turn in)
- Exercises 21.8.9 and 21.8.10 (polymorphic functions)
Chapter 22: lists
You're not required to turn these in for homework 9, but this is
your last chance for feedback on your homework before the final exam,
so the more of them you do, the more feedback I can give you. Whatever
you don't get working by May 8, keep working on it and consider it to
be studying for the final exam.
- Practice exercise 22.4.1 (nothing to turn in)
- Worked exercise 22.4.2 (nothing to turn in)
- Worked exercise 22.5.1 (nothing to turn in)
- Worked exercise 22.5.2 (nothing to turn in)
- Exercise 22.5.3 (
contains-doll?
)
- Exercise 22.5.5 (
count-matches
; read the
Hint!)
- Exercise 22.5.10 (
convert-reversed
)
- Exercise 22.5.11 (
multiply-all
; read the
Hint!)
- Exercise 22.5.17 (
largest
)
- Extra credit: exercises 22.5.18 and/or 22.5.19
(counting blocks of numbers)
- Worked exercise 22.6.1 (nothing to turn in)
- Exercise 22.6.4 (
total-votes
)
- Exercise 22.6.6 (
winner
)
Chapter 23: functions that return lists
Same comment as for chapter 22, above
- Exercise 23.1.2 (
square-each
)
- Exercise 23.1.10 (
backwards
)
- Exercise 23.2.1 (
substitute
)
- Exercise 23.2.1 (
substitute
)
- Exercises 23.2.6-7 (
add-vote-for
and
tally-votes
)
- Exercise 23.6.1 (
sort
)
Grading standards are similar to those in previous assignments.
Last modified:
Stephen Bloch / sbloch@adelphi.edu