W 10/1/14
E
|
Period 2: Test
(see previous day’s entry for instructions).
Period 5: No class.
|
|
Th
10/2/14
F
|
HW due (both
periods): Read Lessons 12 and 13. Reading notes are required, as always.
|
|
F 10/3/14
G
|
Period 2: No
class.
Period 5: No additional HW due. Please use the time to get fully caught up on
all previously assigned reading and written work.
|
|
M 10/6/14
A
|
HW due (both
periods):
1. Read Lesson 14. Reading notes are required, as always.
2. Write #3, 4, 7, 8, 9 on pp. 12-3 and 12-4.
3. Write #1-5 all on p. 12-5.
|
|
T 10/7/14
B
|
Period 2 HW
due:
1. Write corrections, plus a proper diagnosis
and a helpful statement to yourself, for each question on which you did
not earn full credit on the test.
Note: Use a separate sheet of paper
for your corrections. Number the problems in order.
BAD DIAGNOSIS: “Forgot to read
problem.” MUCH BETTER:
“Double-check requirements before moving on to next problem; answer the
question that was posed.”
2. Write code that determines the ASCII codes for each of the letters of your
3 initials. Note: Your code must
determine the answers, not merely print them out.
Period 5: No class, but work on your corrections. Additional assignments for
tomorrow are shown above.
|
|
W 10/8/14
C
|
Period 2: No
class.
Period 5 HW due: Corrections and additional assignments as posted above, in
the 10/7 calendar entry.
|
|
Th
10/9/14
D
(first free-dress day of 2014-15)
|
HW due (both
periods):
1. Read Lesson 15.
2. Write #1, 2, and 3 on p. 15-5.
|
|
F 10/10/14
|
No school
(teacher professional day).
|
|
M 10/13/14
|
No school
(Columbus Day).
|
|
T 10/14/14
E
|
Period 2 HW
due:
1. Read Lesson 16.
2. Our convention is that class names always start with an upper case letter,
whereas object names always start with a lower case letter. Answer the
following questions:
(a) Does Java enforce this convention?
(b) List at least two reasons that this convention makes sense. If you have
more, that is fine, but try to list at least two.
3. By convention, Java uses camel case, whereas Python uses snake case. (If
you don’t know what these terms mean, look them up on Wikipedia.) Do you
personally prefer camel case or snake case for long names of variables,
methods, and classes?
4. Write #6, 8, 9, 11-17, 19, and 20 on pp. 15-5 and 15-6.
5. Do as much of the project on p. 15-7 as you can. Write your code using
pencil and paper, and then implement it on your Java compiler. As you find
your syntax errors (note: it is
expected that you will have several!), mark them on your pencil-and-paper
version in a different color so that you can learn from your mistakes. Be
prepared to show your pencil-and-paper code as well as your live Java code. A
working project is desirable but is not expected for full credit. The
objectives are to practice your syntax and to enjoy a learning adventure.
Period 5: No class.
|
|
W 10/15/14
F
|
Period 2 HW
due:
1. Write #1-5 on p. 16-5. Do them first by “guesswork,” but then go back and
actually write a Java class called MoonRock and a
main method to test your answers. Use this a super-learning opportunity!
Record your stumbles in a different color, and write a “third person comment”
to yourself, addressing yourself by name.
2. Write #6-11 on pp. 16-5 and 16-6. Testing is optional for these exercises.
3. If you have not already done so, complete the project on p. 15-7. Be
prepared to show both your pencil-and-paper code and your live Java code.
Period 5 HW due: See yesterday’s assignment for Period 2.
|
|
Th
10/16/14
G
|
Period 2: No
class.
Period 5 HW due: See yesterday’s assignment for Period 2.
Group assignments for “pairs project on encapsulation” (proposal due F 10/17,
project due W 10/22):
Block 2, Group 1: Ryan F., Natalie B., Nicole N.
Block 2, Group 2: Ryan H., Trevor V.
Block 2, Group 3: Mark C., Zack G.
Block 2, Group 4: Erin B., Nat N.
Block 2, Group 5: Jordan A., Andrew M.
Block 5, Group 1: Annabel A., Diana H.
Block 5, Group 2: George C., Daniel
Block 5, Group 3: Clayton F., Chris
Block 5, Group 4: Kelsey F., Henry S.
Block 5, Group 5: Nick K., Thomas M.
Block 5, Group 6: Becky M., William M.
Block 5, Group 7: Jennifer O., William R.
|
|
F 10/17/14
A
|
HW due (both
periods):
Submit a draft statement of requirements for your pairs project on
encapsulation. Since this project will be due Wednesday of next week, you
need to keep the scope rather limited. Don’t fall victim to “feature creep.”
E-mail submissions are required, using one of the subject line examples
below:
__Block
2 proposal due 20141017: Group 1 (Throckmorton/Vargas)
__Block
5 proposal due 20141017: Group 6 (Adams/Jones)
Last names should be in alphabetical order, separated by forward slashes as
shown in the examples above.
Below are some examples of draft requirements statements. Please find a
project idea that you and your partner think is moderately interesting. (You
don’t have to use birthday collisions for your project.) Note how the good
example incorporates an open-ended statement of how to demonstrate knowledge
of encapsulation.
Good: Program will accept user
input requesting the number of simulated strangers’ birthdays to evaluate.
Input will be validated, with the only acceptable values being integers from
5 through 105, inclusive. After 3 invalid input attempts, program will
default gracefully (no abend) to the value 30.
After valid input is obtained, either through user input or by default,
program will print the requested number of pseudorandom birthdays, omitting
February 29, and will then report whether or not at least one collision
occurred. For simplicity, birthdays will be printed as integers (1 through
365), not as actual calendar dates (e.g., “April 16”). In order to
demonstrate encapsulation, the program will use at least one
custom-programmed class with at least one method that manipulates one or more
objects in that class.
Commentary (not part of what you would
write): For example, the user’s input value between 5 and 105 could be
obtained by using a method to query a requestedPopulation
instance variable within an object of the Birthdays class. That’s not too
hard, but it meets requirements, even though it is a rather wasteful and
contrived approach. A more interesting but also considerably more challenging
way of demonstrating encapsulation would be to store the birthdays in an
array object that has a boolean method that returns
True if at least one collision exists, False otherwise. By leaving your
requirements a little bit open-ended, you can play around with several
approaches and then choose the one that works best for you and your partner.
Absurdly verbose, but also not
ambitious enough: Program will use a pseudorandom integer method, encoded
in a variety of possible ways or, most likely, in the manner we saw
demonstrated in class on at least two or perhaps more than two occasions or
instances of the 2014-15 multi-day rotating course sequence, the calendar
printout of which is posted on multiple bulletin boards and at multiple
locations in and around various and several buildings of a subset of the
Close schools, namely National Cathedral School (NCS) and St. Albans School
(STA). Program will at some point in time and in some manner or fashion use
one of a variety of means to accept an input value from the program’s user,
such that when the program’s user, i.e., the person operating the running
version of the program, provides the input value, which may be imagined or
thought of as an integer n, the
program will accept that value in some manner or fashion and apply the
pseudorandom integer routine exactly n
times, no more and no fewer, in order to print or perhaps display n pseudorandom integer outputs taken
from the set {1, 2, 3, . . . , n}.
If n is not an integer, or if n is less than or equal to 0, or if n is not a whole number, or if n is greater than 7200, or if n is invalid in some other way perhaps
not enumerated here nor, indeed, imagined in any of a variety of ways, then
the program will ask the user for an alternative value of n to replace the admittedly unusable
value that he or she originally provided as input to the program in a variety
of ways, and this request will be repeated ad infinitum, ad nauseam, ex post facto, quid pro quo, b.i.d., P.D.Q. as many times as necessary until
finally and ultimately succeeding and being successful.
Well worded, but not ambitious enough:
Program will ask the user for n, a
positive integer from 1 through 7200, and will ask again, as many times as
needed, if the input is invalid. Program will then print n pseudorandom integers, each of which is a value from 1 through n.
Too ambitious: Program will
compute and print a 2-column table showing values of n and bFunc(n), where the column for n
shows all integers 1 through 30, and the second column) shows the output
values from a simulated “birthday” probability function, bFunc(n). The output of bFunc(n) shall be the result of a simulation
of a user-requested number of trials, nTrials, with
bFunc(n)
being a Monte Carlo estimate of the probability of having at least one
collision among n pseudorandomly chosen birthdays from January 1 through
December 31. The distribution of birthdays shall not be uniform but shall
instead have a probability of 4/1461 for each standard date in a 365-day year
and 1/1461 for February 29. In order to demonstrate encapsulation, the
program will use a boolean method to determine
whether the currently generated birthday vector (object) is or is not
collision-free.
|
|
M 10/20/14
B
|
HW due (both
periods): Work on your project that is due Wednesday. Submit a revised
requirements statement (using the same subject line that was required before)
by noon on Saturday, 10/18/2014.
Period 5: No class, but be sure to submit your revised requirements
statement.
|
|
T 10/21/14
C
|
Period 2: No
class.
Period 5 HW due: Work on your project. If you need to make a change to the
requirements, your change needs to be submitted and approved in writing in ample time before the
due date.
|
|
W 10/22/14
D
|
HW due (both
periods): Complete your project. If you need to make a change to the
requirements, your change needs to be submitted and approved in writing in ample time before the
due date.
Projects will be demonstrated and approved in class, then e-mailed using a
subject line to be provided after the start of class.
|
|
Th
10/23/14
E
|
Period 2 HW
due:
1. Reread Lesson 16 if necessary to refresh your memory. (This reading was
previously assigned.)
2. Read Lesson 17. Reading notes are required, as always.
3. Write #17 on p. 16-7, making guesses before you actually run the code.
Write instructions to yourself as error corrections. (Example: “Remember that
.equals is not the same as = = .”) Addressing yourself by name is optional. Important: Be sure to show the setup
for each question. For example, you could write this:
17a. System.out.println(mystring == yourstring); //returns True
//
since both vbls. reference same String object
4. Write #1, 2, 3, 4, 5 on p. 16-8. You may write bare answers (no setup) for
these questions.
5. Write #1-15 on pp. 17-7 and 17-8. Make guesses before you actually run the
code. As you did for #17 on p. 16-7, write short instructions to yourself for
any that you get wrong. You may write bare answers (no setup) for these
questions.
Period 5: No class.
|
|
F 10/24/14
F
|
Period 2 HW
due: Prepare a list of at least 5 review questions. Ten or more would be
preferred, but 5 will qualify for full credit. It is acceptable to take some
of your questions from the textbook, but it is more educational for you to
write your own. Mark those that are original (i.e., not copied or adapted
from the textbook or another source) with an asterisk (*). In class, we will
use some of your personal questions to review for the test.
Period 5 HW due: Do all the assignments that the other class had for
yesterday and today.
In class: Review.
|
|
M 10/27/14
G
|
Period 2: No
class.
Period 5: Test (100 pts.) on the
entire semester to this point.
|
|
T 10/28/14
A
|
Period 2: Test (100 pts.) on the entire semester to
this point. Jordan, Mark, Ryan F., Zack, and Andrew all have one other
test scheduled for this day, but nobody has two other tests.
Period 5: No additional HW due. Use this as a chance to get caught up if
necessary.
|
|
W 10/29/14
B
|
Period 2 HW
due: Read Lesson 18; write #1-11 on pp. 17-10 and 17-11, plus #1, 2, 3 on p.
18-6.
Period 5: No class.
|
|
Th
10/30/14
C
|
Period 2: No
class.
Period 5 HW due: Read Lesson 18; write #1-11 on pp. 17-10 and 17-11, plus #1,
2, 3 on p. 18-6.
|
|
F 10/31/14
X
|
Work period:
Report for class at the usual time, but bring reading material or something
to work on. You may work on next Monday’s assignments if you wish.
|
|