Lecture Slides and Code Examples

This is the repository for the lecture slides and code examples from class. All slides here are in Adobe Acrobat format; the reader for this format is available for free (look for the Acrobat Reader logo at the bottom of the Adobe Systems web site).

Note that some sets of slides here actually represent material covered in more than one lecture. Since the slides posted here are meant to be a reference (rather than a replacement) for class, the slides here are organized by topic rather than by date of class presentation.

Slides by Topic (in chronological order of coverage)
Introduction to Java and GObjects
Statements and Control Structures
Methods, Parameters and Instance Variables
Random Number Generator
Classes and Constructors
Extending the Student Class
Javadoc
ACM Graphics Library
Event-driven programs
chars and Strings
Memory (stack and heap)
ArrayList
Java Collections Framework
Interactors
Component class hierarchy

Code Examples by Topic Filename
Simple Graphics Checkerboard.java
Methods FactorialExample.java
Classes (Incrementor) Incrementor.java
Classes (Uses Incrementor) UseCounter.java
Classes (Student) Student.java
Classes (Uses Student) Stanford.java
Random Numbers RollDice.java
Random Numbers ColorChangingSquare.java
Files FilesExamples.java
Files AnotherFileExample.java
Files CopyFile.java
Arrays ArraysExample.java
Arrays SwapExample.java
Arrays GrayImage.java
Arrays TestScores.java
ArrayLists SimpleArrayListExample.java
ArrayLists GraphicNumbers.java
ArrayLists NumberList.java
HashMaps HashMapExample.java
Interactors FirstButton.java
Interactors InteractiveDrawFace.java
Interactors TextFieldExample.java
Interactors Temperature.java
Components TextAndGraphics.java
Components MyProg.java
Components MyCanvas.java
Components Album.java
Components MusicShopDisplay.java
Components MusicShop.java
Threads Slider.java
Threads SliderProgram.java
Threads RacingSquare.java
Threads ThreadsExample.java

For issues or comments on this web page, please send mail to the TA