handouts/slides:

If you do not have Microsoft PowerPoint, you can view the lecture slides using the free Microsoft PowerPoint Viewer available in the Useful Links section.

handouts/2006-12-09:

Today we ran our Critter tournament. We also did course evaluations.

handouts/2006-12-06:

Today we finished Chapter 9 by talking about interfaces (slide set ch09-3). We also talked a bit about the final exam format; the sample final exam #1 has been posted.

handouts/2006-12-04:

Today we covered more about inheritance (slide set ch09-2). We talked about interacting with the superclass, particularly when the superclass has constructors and fields. We then learned how to solve "inheritance mystery" problems. There will be such a problem on the final exam.

handouts/2006-12-01:

Today we began learning about inheritance (slide set ch09-1). We wrote a hierarchy of classes to represent employees. We learned how to extend a class and how to override a method. We also learned how to use the super keyword to call an overridden method from the superclass.

handouts/2006-11-29:

Today we finished our discussion of Chapter 8 (slide set ch08-3). We talked about the toString method that enables client code to print objects. We also saw the this keyword that can be used to explicitly refer to the implicit parameter object. Homework 8 (Critter Safari) was assigned. We talked briefly about how to implement a critter animal named Bird. To place Birds into the simulation, the following line must be added to CritterMain.java:

model.add(25, Bird.class);

handouts/2006-11-27:

Today we continued our discussion of objects (slide set ch08-2). We learned about constructors, which are special methods that initialize objects. We also learned about encapsulation, where the data inside the object is protected from outside access. We used encapsulation to establish an invariant so that Point objects will never have negative coordinates.

handouts/2006-11-20:

Today we began learning about defining new classes of objects (slide set ch08-1). We implemented part of a Point class and also wrote a client program named PointMain that uses Point objects. We gave some state (fields) and behavior (instance methods) to each Point object, but the class is still incomplete.

handouts/2006-11-17:

Today we talked about several topics. First we saw how to produce text output files using PrintStream objects (slide set ch06-4, the last few slides). We also saw how to pass arrays as parameters and use them as return values; most importantly, that they use reference semantics (slide set ch07-3). The Sections3.java program demonstrates these ideas. Next we talked about null, which is a reference that does not refer to any object. The HoursWorked2 program shows an example usage of null. We also saw that arrays of objects initially store null for each element.

The Names.java is an extra program that demonstrates an array of Strings, in case you want such an example to help you with Homework 7.

handouts/2006-11-15:

Today we talked about array traversal algorithms (slide set ch07-2). We implemented a program to compute student section scores, Sections.java. The Sections2.java file shows a more advanced version of the program, not written in class, that decomposes the problem into static methods. To achieve this, the Sections2 program uses arrays as parameters and return values, which we will cover in more detail in section and on Friday. Homework 7 (DNA) was assigned.

handouts/2006-11-13:

Today we began talking about arrays (slide set ch07-1). We used an array to store data from the console and re-examine it later in our program (WeatherAverage.java), and we also saw that arrays can be used to tally counts of numbers (Digits.java, Histogram.java). The Histogram2 program draws a graphical version of the histogram data.

handouts/2006-11-08:

Today we finished Chapter 6 (slide set ch06-4) by doing a larger file processing example that reads input about the top 250 movies stored in the Internet Movie Database (IMDB). In class we wrote the Movies.java program. The Movies2.java program is a graphical version of the same program that you can use as a reference. Homework 6 (Baby Names) was assigned.

handouts/2006-11-06:

Today was the midterm exam.

handouts/2006-11-03:

Today we reviewed for Monday's midterm exam, doing several practice problems (slide set ch06-3_midterm).

handouts/2006-11-01:

Today we talked about line-by-line file processing (slide set ch06-2), searching a file for a particular record, and how to read a hybrid of lines and tokens from a file.

handouts/2006-10-30:

Today we talked about the midterm exam and began learning how to read input files (slide set ch06-1). Don't forget to bring your UW Husky ID card to the midterm!

handouts/2006-10-27:

Today we talked about logical assertions (slides ch05-3). We also briefly talked about variations of while loops, including the do/while loop. A practice midterm exam will be posted sometime this weekend. Students in the 9:30am section were also subjected to an embarrassing rap song.

handouts/2006-10-25:

Today we talked about boolean logic (slide set ch05-2). We also saw an example that uses Point objects (slide set ch03-3, slides #7-10). Homework 5: Guess2D was assigned. (Dice.java, Difference.java, and MultTutor.java are extra example programs.)

handouts/2006-10-23:

Today we began coverage of Chapter 5, learning about while loops, sentinel loops, and random numbers (slide set ch05-1).

handouts/2006-10-20:

Today we talked about fencepost loops and text processing with the String and char types (slide set ch04-2).

handouts/2006-10-18:

Today we began Chapter 4 on conditional execution with if/else statements (slide set ch04-1). Homework 4 was assigned.

handouts/2006-10-16:

Today we learned how to draw graphical figures using the DrawingPanel, Graphics, and Color objects (slide set ch03g). Note that the file DrawingPanel.java must be in the same folder as your program for graphical programs to work.

handouts/2006-10-13:

Today we got more practice with the Scanner object. We also saw the cumulative sum technique (slide set ch03-3). There are also some slides in ch03-3 about objects such as String and Point, but Marty's lecture did not cover those yet.

handouts/2006-10-11:

Today we talked about methods that return values (slide set ch03-2). We also briefly discussed the concept of objects, in particular the Scanner object, which reads input from the user's keyboard. Homework 3 (Grades) was given out. To get an idea how to approach Homework 3, you may wish to look at the BMI2.java program and the ch03-2 slides about doing a "cumulative sum."

handouts/2006-10-09:

Today we began Chapter 3, learning about parameters (slide set ch03-1).

handouts/2006-10-06:

Today we finished Chapter 2. We did more examples of nested loops, then looked at using nested loops to draw complex figures, as well as class constants (Slide set ch02-3). Homework Assignment 2 was given out.

handouts/2006-10-04:

Today we finished some topics from slide set ch02-1 including string concatenation with the + operator, incrementing variables with the ++ operator, and the System.out.print statement. Then we talked about for loops (slide set ch02-2) and began to learn about nested loops.

handouts/2006-10-02:

Today we learned about expressions and variables, using types int and double. (slide set ch02-1)

handouts/2006-09-29:

Today we learned about static methods, which are used to capture structure and redundancy in a program. (Slide set ch01-2) Homework Assignment 1 was given out.

handouts/2006-09-27:

Today we covered the syllabus and course policies, then learned about basic Java programs that produce output with the System.out.println command. (Slide set ch01-1)