ICS 22 / CSE 22 Winter 2012
Code Examples
Code examples, from lecture and otherwise
Over the course of the quarter, I'll be providing commented code examples for you. 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.
| Lecture Date(s) | Description |
| Th 1/12 | Our DayOfWeek example of enums from lecture |
| Th 1/12 Tu 1/17 |
An example of using exceptions and reading text from input files |
| Tu 1/24 | Unit testing and test-driven development with JUnit |
| Th 1/26 | Writing JUnit tests that expect exceptions to happen |
| Th 1/26 | Identity vs. equivalence, and writing an equals() method in your own classes |
| Tu 1/31 Th 2/2 |
Inheritance and polymorphism |