Code Examples and Reading Assignments

This page documents what we do in class. It contains Java programs that we will discuss in class, reading assignments from the textbook, and links to other sources of information.

The reading assignments are listed by the date on which they are 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, September 15.
    • See the homework page for your third homework assignment.
    • For Monday, read Chapter 3, Section 3.2 (pages 149-154).
  • Monday, September 13.
    • Use DrJava's Interaction Pane to do Self-Test Questions 20-26 (page 82).
    • Use DrJava's Interaction Pane to do Exercises 6-10 (pages 114-115).
    • For Wednesday, read Chapter 3, Section 3.1 (pages 124-148).
    • Here is the example code that we did in class, based on the material from Section 2.2.
  • Wednesday, September 8.
    • See the homework page for your second programming assignment.
    • For next Monday, read Chapter 2, Sections 2.2 - 2.4 (pages 73-99).
    • Use DrJava's Interaction Pane to do Exercises 1 - 4 (pages 113-114). If you do these problems with the Interactions Pane, then you do not need to use the Scanner class.
    • Here are three simples programs for Section 2.1.
  • Wednesday, September 1.
    • See the homework page for your first programming assignment.
    • For next Wednesday, read Chapter 2, Section 2.1 (pages 44-73).
    • Here is Listing 1.1 from page 15 of the textbook.
  • Monday, August 30.
    • For today and Wednesday, read Chapter 1 (pages 4-27) from the textbook.
    • On your home computer, install Java and DrJava as described in these instructions.
    • Here is a brief DrJava Primer.
    • Here is a simple program that helps demonstrate the difference between DrJava's "Definitions Pane" and "Interactions Pane".
    • Use the "Interactions Pane" in DrJava to do Self Test Questions 11, 12, 14 on page 18 of the textbook. Do the same for Exercises 6 and 7, page 37 from the textbook.
    • Use the "Definitions Pane" in DrJava to do Self Test Questions 15 on page 18 of the textbook. Do the same for Exercise 6, page 37 from the textbook.


Return to the CS 12300 home page.


compliments and criticisms