This website is preserved for historical and scholarly reference and is no longer actively maintained.
CP SC 241, Section 1: Homework Assignments for Spring 2000
Each homework assignment will be counted as if it were a daily quiz.
- due Monday, Feb. 7: Problem 1.11 (a) on page 38. Use the same
form as on the example passed out in class. Fibonacci numbers are
given on page 6.
- due Monday, Feb. 14: Turn in a spreadsheet giving your grades
for at least the first 10 short quizzes, your average for these
quizzes with the two worst grades (which may be absences) dropped,
and state the percentage of the final grade that daily quizzes
will count. Spreadsheet will be graded on clarity, correctness,
and completeness.
- EXTRA CREDIT -- replaces a lowest daily quiz or homework grade
due Monday, February 28 by midnight. Not accepted late.
Turn in using Email -- DO NOT SEND ATTACHMENTS
Problem #13 on Hour Quiz I would encounter problems if actually
written as part of class List.
For 5 pts. explain why the
method as written should not be part of the class. Include a
reference to the page in our text which contains an example
showing why the method has problems.
For an additional 5 pts. give the header for a List method
that would compute the size of the List correctly. (An alternative
that we will not consider is list keeping an instance variable
containing the size of the list.)
- due Wednesday, March 1. Not accepted late.
NOT ACCEPTED BY EMAIL
Turn in a spreadsheet giving
- Short quiz grades through Quiz 15 on February 21 and homework
grades for the proof by induction and the spreadsheet, including both quiz number and date. Each homework grade
is equivalent to a short quiz grade. There are 17 short quiz/homework grades soyou should drop (greatest integer in (0.2 * 17)) = 3 grades before averaging.
State the percentage the short quiz/homework grades are of the final grade.
- Your hour quiz grade. State the percentage this hour quiz grade is of the final grade.
- The program grades for all programs that have been returned to you. State the percentage the program grades are of the final grade.
If you are missing a program grade, you should explain why that program grade is missing.
Spreadsheets will be graded on clarity, correctness, completeness, and
visual impact (should be visually pleasing and easy to understand).
- EXTRA CREDIT -- replaces a lowest daily quiz or homework grade
DO NOT SEND ATTACHMENTS.
due
by Email by
noon Friday, March 3.
This was the puzzler on Car Talk this week. It has
many versions, but ...
Three men go fishing. They decide in advance that they
will share all the fish they catch equally -- each
will get 1/3 of the fish.
All go to sleep.
Person A wakes up in the middle of the night and decides
to collect his 1/3 of the fish. The number of fish is
not divisible by 3. He throws one away. Now the number
is divisible by 3. He takes his third and goes back
to sleep.
Person B wakes up, doesn't realize that anyone has taken
any fish and decides to take his third, but the number
of fish is not divisible by 3. He throws one away.
Now the number of fish is a multiple of 3. He takes
his third and goes back to sleep.
Person C wakes up, doesn't realize that anyone has
taken any fish and decides to take his third, but the
number of fish is not divisible by 3. He throws one away.
Now the number of fish is a multiple of 3.
Question: ( 2 pts.) What is the smallest number of fish
they could have caught?
( 8 pts.) Explain clearly how you arrived at this answer.
- due Monday, March 6. Not accepted late.
Turn in at class time. Not accepted by Email.
In the programming assignment (#6) that was due on March 1, it would be nice
if you could print out the words in order of the integers
associated with them. Part of printing the words out in order
of their associated integers would be to retrieve the word
associated with an arbitrary integer k. Thus, you could have
pseudocode of the form
for ( k = 1 ; k <= MaxN ; k++ ) print kth word
Give a pseudocode algorithm for Assignment #6, together with drawings of
data structures, that would easily support the hash table
and also these requirements. You must include a "walkthrough" of an
example, showing how data will be stored and explaining what each
method does. Reasonable space and time
efficiency is expected.
- due Friday, April 28. (counts as two daily quizzes)
Turn in at class time. NOT ACCEPTED BY EMAIL
Turn in a spreadsheet that
(1) Lists all daily quiz grades
through Quiz 36 on Friday, April 21,
and all homework grades that you have. Indicate which quiz/homework
grades you are dropping, the average after dropping these grades,
and give the percentage of the final grade
that these grades count.
(2) Lists both hour quiz grades and the percentage of the final
grade that each counts.
(3) Lists the Program grades that you have (should be through
Assignment #7), the average of these program grades, and the
percentage that the program grades count.
(4) Lists the lab grades that you have been given, the average
of these lab grades, and the percentage of the final grade that
the lab grades count.
Finally, give an estimate of your grade going into the
final exam. Using the grades you have so far, multiply each type
of grade by the percentage it counts, expressed as 0.xy for xy%,
sum the values,
and divide by 0.775 to compute the estimate.
Spreadsheets will be graded on clarity, correctness,
completeness, and visual impact (should be visually pleasing and easy
to understand).