Archive for January, 2008

Week 6, Day 1… the second half begins!

Wednesday, January 30th, 2008

Hey guys,

We’ll start the 2nd half with Chapter 8, Trees.

I have posted Program #3. It’s called Quadtree. Enjoy!

http://william.krieger.faculty.noctrl.edu/csc210/program03.pdf 

There’s a homework due at the beginning of class as well. Homework #5 is my prodding you to start now, now, now on Program #3. It’s here: Homework #5

study faster… yow, bill

My Program #2 solution

Tuesday, January 29th, 2008

Hey guys,

My program #2 solution is available on the k: drive.

You can also play with it here:

william.krieger.faculty.noctrl.edu/csc210/program02

Email me if you have any questions or want to know your grade on Program #2.

thanks… yow, bill

PS - My program #1 is here:

william.krieger.faculty.noctrl.edu/csc210/program01

Week 5, Day 2… the midterm

Monday, January 28th, 2008

Hey,

Here are some details of the midterm exam:

  • The exam is this Wednesday, Jan 30, 2008.
  • It’s worth 30% of your final grade.
  • You are welcome and encouraged to bring one side of one page of notes. You are not allowed use your book, a calculator, or neighbor.
  • The exam will cover Chapters 1-7 and Appendices A-C. Appendix B on UML is important because of class diagrams.  I’m not going to ask you a bunch of general off-the-top-of-my-head Java or Java GUI questions. I also don’t expect you to be a Java compiler. I do expect you to quickly code up small snippets of code to show concepts like inheritance, generics, exceptions, ADT’s, etc. Make sense?

run… yow, bill

Week 5, Day 1… Calm before the storm

Friday, January 25th, 2008

Hey,

Your Program #2 is due by midnight Monday. In class, we’ll preview the Midterm (next class) and then have some quality Program #2 time in the lab.

Please email me your Program #2 questions as they arise. I’ll be hunched over my tube this weekend… F5… F5… F5…

Also, I’ll be in my office by 5:00 Monday night.

thanks… yow, bill

More lecture shenanigans

Wednesday, January 23rd, 2008

Hey,

I made some comment in lecture Monday about it being hard (or something) to copy array data from one array to another.

Um. Oops.

It’s really, really easy. Please checkout the call to System.arraycopy() on page 207 of our textbook. You can also peek at the Java Api pages at: http://java.sun.com/j2se/1.5.0/docs/api/index.html

Also, checkout the warning about a place where you can’t use it on page 321, but that’s another issue entirely.

gotta run… yow, bill

Answering Alex… finally

Tuesday, January 22nd, 2008

Hi,

Alex asked an outstanding question last night: what’s the difference between the finally block and just placing code after the whole try-catch series of code?

Well, the answer is “Yup, it’s different.”

When they say a finally block always executes after the try-catch blocks, they mean it. Look at this snippet:

try {

System.out.println( “Bill rules!”);

return;

}

finally {

System.out.println( “Finally, eh.”);

}

If you run this the output will be “Bill rules!”, then “Finally, eh.”, and then return. See the return statement in the try block is “delayed” (for lack of a better word), until the finally block code is executed. Pretty weird, eh.

I’ll show you some code for this in lecture tomorrow night. Excellent question, Alex!

thanks… yow, bill

Week 4, Day 2… cruising

Tuesday, January 22nd, 2008

Hey guys,

We are cruising.

This evening we should wrap pretty much all the material that will be on the Midterm. The Midterm is a week from today, BTW. Go:

  • We’ll chat up Homework #3, the Chapter 2 stuff.
  • I’ll take your questions on Chapters 5/6, and then we’ll take a surprise pop quiz, ala Homework #4.
  • With all that in our pockets, we’ll talk about the subtle vagaries of Program #2.

We should get some good lab time in as well. Once there, I’ll talk to each of you about your Program #1 results, and I’ll ask to see your Program #2 notes and code.

thanks… yow, bill

Two, count ‘em two, homeworks posted

Monday, January 21st, 2008

Hey guys,

I have posted homeworks #3 and #4.

  • Homework on Chapter 2  Exceptions and Efficiency: Homework #3
  • “Homework” on Chapters 5 & 6: Homework #4

run… yow, bill

Some Java hints

Thursday, January 17th, 2008

Folks,

A couple of Java-related hints from our experiences in Program #1.

1. Reloading your applet - Hitting refresh in your Firefox browser does not reload your applet code. The only way that I know to do this is to shut down Firefox and then restart it. I believe this also to be true of IE. For this reason, I encourage you to debug your applet code in NetBeans until it is working there. Then, copy the files over to the w: drive and get them up and running on your web page.

2. Java Version woes - I had some reports of Java version problems in some of the applet code. I have not seen this in person, but it is possible that Java V1.6 code might not run on some older browsers. You can change the version used by NetBeans like this:

  • Right-click on your project
  • Select “Properties”
  • At the bottom you should see “Source Level”… this is where you can select/change the version of Java you want NetBeans to use.

3. Cool Javadoc options - Javadoc has two cool options that you probably want to turn on. First, you need to tell Javadoc that you want your “@author” tag to show up in your web pages. Second, you can tell Javadoc to put links directly to your code in your web pages. Here’s what you need to do in NetBeans:

  • Right-click on your project
  • Select “Properties”
  • Select “Documenting”
  • Turn the “@author” tag on
  • Add this to “Additional Javadoc options”: -linksource

Do that, and the regenerate your Javadoc.

cool… yow, bill

Week4, Day 1… idiom

Thursday, January 17th, 2008

Hey all,

From “The Grail”:

Lancelot: “Brave, brave Concorde, you shall not have died in vain!”
Concorde: “Uh, I’m– I’m not quite dead, sir.”
Lancelot: “Well, you shall not have been mortally wounded in vain!”
Concorde: “I– I– I think I– I could pull through, sir.”
Lancelot: “Oh, I see.”
Concorde: “Actually, I think I’m all right to come with you, sir.”
Lancelot: “No, no, sweet Concorde! Stay here! I will send help as soon as I have accomplished a daring and heroic rescue in my own particular…” [frustrated sigh]
Concorde: “Idiom, sir?”
Lancelot: “Idiom!”

Sorry about that.

Anyway, Monday’s class will feature:

  • Wrap of Chapter 4 Lists
  • Please read Chapter 2 on Efficiency… we’ll chat on that topic for a while.
  • If we have time, we’ll start on Chater 5 Stacks… or as my British brother might say, “Stacques”. Or is that French? Never mind.
  • We’ll head up to the lab, where you’ll show me your notes, UML, or code for Program #2.

“Some day lad, all this will be yours.”

what, the curtains… yow, bill