Informatics 43 Spring 2009
Code Examples

Code examples, from lecture and otherwise

Over the course of the quarter, as we work on code examples in lecture or discussion, I'll be providing commented code examples for you. These examples are mostly to give you clean and well-documented examples of some of the things we cover in lecture (and possibly a few things that we don't, time permitting), so that you can be free in lecture to avoid trying to take detailed notes when we're writing code together, instead concentrating on understanding the process and the bigger-picture concepts at work in the examples.

Lecture Date(s) Description
Th 5/7
Tu 5/12
Unit testing with JUnit — including factories and mocks, for simplifying your tests and eliminating external dependencies
Th 5/14 Serialization in Java, both manually and using Java's built-in serialization mechanism

How to use these examples in Eclipse

Here's what you'll want to do in order to pull each example into Eclipse.

After taking these steps, the example should be available in Eclipse!

Note that Eclipse will collapse a large comment that I've written at the top of each .java file, so that you can only see the first line of it. You'll want to be sure to expand these comments (by clicking the little + next to them) and read them, because that's where a lot of the useful information is.