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.


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


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.


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.


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.


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);


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.


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.


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.


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.


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.


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.


Today was the midterm exam.


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


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.


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!


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.


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.)


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


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


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


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.


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.


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."


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


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.


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.


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


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.


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)