ICS 22 / CSE 22 Fall 2008
Code Examples


Code examples, from lecture and otherwise

Over the course of the quarter, I'll be providing commented code examples for your perusal. You are not permitted to copy and paste any of this code into your own projects. 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 when we develop the examples.

Lecture Date(s) Description
Tu 9/30 A completed, commented version of the "count lines in file" example from lecture
Th 10/9
Tu 10/14
The student/full-time/part-time example of inheritance and polymorphism — including the super() construct
Tu 10/14 An example of implementing an equals() method
Th 10/16 Two examples of programmatic unit testing
Tu 10/21 Interfaces, comparability, and natural ordering
Th 11/13 An example of using JUnit to write tests