|
This page documents what we do in class. It contains Java programs that we will discuss in class, simple homework exercises that you can work on for practice and exam preparation (not for credit), and reading assignments from our textbook.
The reading assignments and practice problems are listed by the date on which they were assigned. The sample program files are listed by the date on which they were used. You can click on either a .java link and see the source code, or click on a .html link (when available) and see an applet running. When you are viewing the source code, you can use your browser's "File -> Save As..." menu item to save a copy of the file on your computer. It is a good idea for you to "play" with these example programs; compile them, run them, make simple changes to them and compile and run them again.
|
- Wednesday, December 8.
- The final exam is on Monday, December 13, from 1:00 pm to 3:00 pm.
- Here is a brief outline of the structure of the Java GUI framework.
- Here two programs, one that lets you see how Java refreshes a graphics context, and another that lets you observe, using a variety of different kinds of GUI components, how events work in Java.
- Monday, December 6.
- Here is a zip file containing solutions to assignments 10 and 11.
- For Wednesday, read Section 12.4 and Section 13.1.
- Some examples of simple "computer graphics".
- An interesting way to learn Java programming is to experiment with these three different competitive programming games, CodeRuler, CodeRally, and Robocode (all three of these games were developed by IBM).
- Wednesday, December 1.
- See the homework page for your twelfth (and last) programming assignment.
- For Monday, read Section 12.3 (pages 742-755).
- Here are links to two more articles about "object oriented design".
- Examples for Section 12.2.
- Monday, November 29.
- Here are links to two interesting articles about "object oriented design". These are not elementary articles, but you should be able to figure out the main idea of each one.
- Here is are examples, for Section 7.3, of polymorphism.
- Wednesday, November 24.
- See the homework page for your eleventh programming assignment.
- For next Monday, read Sections 12.1 and 12.2 (pages 710-741).
- Here is a "realistic" example of how we can use inheritance to "reuse" code.
- TemperatureReading.java
- TemperatureAndTime.java
- TemperatureTimeAndLocation.java
- Note: There is another way to implement the idea of an object that encapsulates both temperature and time. The other way uses "composition" instead of "inheritance". Instead of saying that a
TemperatureAndTime object "is a" TemperatureReading object, we can say that a TemperatureAndTime object "has a" TemperatureReading object and "has a" Date object. So a TemperatureAndTime object is "composed" of a TemperatureReading object and a Date object (which is, of course, another form of "code reuse").
- Here is a "realistic" example of how we can use inheritance to separate interface from implementation (this is the beginning of the idea of "polymorphism" from Section 7.3).
- Here is are examples, for Section 7.3, of polymorphism.
- Monday, November 22.
- Here is an example, for Section 7.2 (pp 456-457), of "interfaces" and their implementation.
- Wednesday, November 17.
- For next Monday, read Section 7.3 (pages 458-465).
- Here is an example, for Section 7.2 (pp 452-455), of an abstract class and two concrete implementations of the abstract class.
- Monday, November 15.
Wednesday, November 10.
Monday, November 8.
- Remember that the next exam is this Wednesday. The exam will be over Chapters 4, 5, and 6.
- For next Monday, read Sections 7.1 and 7.2 (pages 416-457).
- Here are example programs for Sections 6.3 and 6.5.
Wednesday, November 3.
- Remember that the next exam is Wednesday, November 10, a week from today. The exam will be over Chapters 4, 5, and 6.
- See the homework page for your ninth programming assignment.
- For Monday, read Section 7.1 (pages 416-427).
- Here are example programs for Sections 6.3 and 6.5.
Monday, November 1.
- For Wednesday, read Sections 6.5 (pages 388-404).
- Here is an example program for Sections 6.2 and 6.3.
Wednesday, October 27.
- For Monday, read Sections 6.3 and 6.4 (pages 372-388).
- Here are example programs for Sections 6.1 and 6.2.
Monday, October 25.
- See the homework page for your eighth programming assignment.
- For Wednesday, read Section 6.2 (pages 354-372).
- Here are example programs for Section 6.1.
Wednesday, October 20.
- For next Monday, read Sections 6.1 and 6.2 (pages 342-372).
- Here are example programs for Sections 5.4 and 5.5.
Monday, October 18.
- See the homework page for your seventh programming assignment.
- For Wednesday, read Sections 5.5, 5.6, and 5.7 (pages 312-330).
- Here is an example program for Section 5.4.
Wednesday, October 13.
- For Monday, read Sections 5.3 and 5.4 (pages 286-311).
- Here are example programs for Section 5.2.
- Here are four programs that demonstrate various properties of instance, static, and local variables. You should analyze these programs by drawing pictures of the way that the Java system stores the various variables and methods in memory.
Monday, October 11.
- See the homework page for your sixth programming assignment.
- For Wednesday, read Chapter 5, Sections 5.1 and 5.2 (pages 262-286).
- Here is an example program for Section 5.2.
Monday, October 4.
- Remember that the first exam is on Wednesday. It will be over the first four chapters of the textbook.
- Here is an explanation of classes and objects in Java written for fourth graders. It's worth reading.
- Here are example programs for Sections 4.2 and 4.3.
- If you want to create a Javadoc tool in JCreator, here is a parameter list for the Javadoc tool that cuts down a bit on the number of files created and the clutter in the Javadoc pages.
- -notree -noindex -nohelp -nodeprecated -nonavbar $[FileName]
Wednesday, September 29.
- See the homework page for your fifth programming assignment.
- For next Monday, read Chapter 4, Section 4.3 (pages 230-251).
- Remember that the first exam is a week from today, on October 6. It will be over the first four chapters of the textbook.
- Here is an example program for Sections 4.1 and 4.2.
Monday, September 27.
- For Wednesday, read Chapter 4, Section 4.2 (pages 210-229).
- Here are example programs for Section 4.1.
Wednesday, September 22.
- See the homework page for your fourth programming assignment.
- For Monday, read Chapter 4, Section 4.1 (pages 182-210).
- Here are example programs for Sections 3.2, 3.3, and 3.4.
- Here is a short program that you can use to test the idea of I/O redirection as it is used in Programming Assignment 4.
Monday, September 20.
- For Wednesday, read Chapter 3, Section 3.4 (pages 162-171).
- Here are example programs for Section 3.2.
Wednesday, September 15.
- See the homework page for your third programming assignment.
- For Monday, read Chapter 3, Sections 3.2 and 3.3 (pages 128-162).
- Here are example programs for Section 3.1.
Monday, September 13.
- For Wednesday, read Chapter 3, Section 3.1 (pages 104-127).
- Here are two example programs for Sections 2.2 and 2.3.
Wednesday, September 8.
- See the homework page for your second programming assignment.
- For next Monday, read Chapter 2, Sections 2.3 and 2.4 (pages 79-95).
- Here are some simple examples of Java programs.
Wednesday, September 1.
- See the homework page for your first programming assignment.
- For next Wednesday, read Chapter 2, Sections 2.1 and 2.2 (pages 40-78).
- Here are some simple examples of Java programs.
- Here is a template for writing your own simple Java programs.
Monday, August 30.
- Read all of Chapter 1, but our main emphasis will be on Sections 1.2 and 1.3.
- Do the "Self-Test Exercises" throughout Chapter 1 (the solutions are on pages 34-35).
- Do "Programming Projects" 1 and 2 on page 36.
- Here is the example program used in Section 1.3 (and needed for Programming Projects 1 and 2).
|
|
|
|