Computer Science 15-110 (Lecture 4), Spring 2010
Homework 5
Due: Mon 15-Feb-2010 at 10pm (email copy to koz)
(no late submissions accepted).
Hw5 Submission Coordinator: koz
For this homework, special rules apply.
Read these carefully!
- You should work collaboratively in small groups (no more than
5 students at a time; preferably, groups of 3).
Note: collaboration is not technically required, but it is strongly
recommended.
- You may only collaborate with other students in our sections of
15-110 this semester. Or the course staff, of course!
- Specifically: you may work with other students to jointly
author solutions (which in that case might be nearly identical). Thus,
on this assignment, you may look at other students' code so long as you are
working closely together on the problem.
- That said: you may not look at, copy, or submit code that you
did not substantially help write yourself!
- The grading is as such:
- Pass: every method works properly and has been reasonably
well tested.
(Note: a grade of Pass has no effect, positive or negative, on
your semester hw average.)
- 80: at least 1 method has a significant bug (or is mostly
unimplemented).
- 70: at least 2 methods each have a significant bug (or are
mostly unimplemented).
- 60: at least 3 methods each have a significant bug (or are
mostly unimplemented).
- 50: at least 4 methods each have a significant bug (or are
mostly unimplemented).
- 40: at least 5 methods each have a significant bug (or are
mostly unimplemented).
- 30: at least 6 methods each have a significant bug (or are
mostly unimplemented).
- 20: at least 7 methods each have a significant bug (or are
mostly unimplemented).
- 10: at least 8 methods each have a significant bug (or are
mostly unimplemented).
- How to submit:
- You will self-report your grade.
- In the subject line of your email, indicate your grade.
- Improperly reported grades will result in up to a 25-point
reduction.
- In the body of your email, explain briefly why you received that
grade (no explanation necessary for "Pass" -- for the others, though,
state which methods are buggy or missing).
- As an attachment to the email, include all your .java
files (and only your .java files!). These must be
included to receive a >0 score.
- What to submit:
- Do all the problems from
recitation 5 (the CA-directed and the student-directed
parts). That is:
-
mostFrequentLetter
-
isHappyNumber
-
nthHappyNumber
-
isHappyPrime
-
nthHappyPrime
-
isRotation
-
isEmirpsPrime
-
nthEmirpsPrime
- Also, do this additional
problem from class:
- baselProblem
Write a Java program that verifies Euler's remarkable solution
to the Basel Problem. That is, write a program that verifies
the following is true to very high accuracy if enough terms are
used:
1/12 + 1/22 + 1/32 + ... =
π2/6
You may wish to use the value Math.PI in your program.
- Also include appropriate robotic test methods for all the
methods.
Carpe diem!