Here is the code that we wrote in class today.
This page documents what we do in class. It contains Java programs that we will discuss in class, reading assignments, simple homework exercises that you can work on for practice and exam preparation (not for credit), and links to other sources of information. It is a good idea for you to "play" with the example Java programs; compile them, run them, make simple changes to them and compile and run them again.
Here is the code that we wrote in class today.
The final exam will be one week from today, on Monday, December 9.
Here is a summary of the final exam topics and some review/practice problems.
Here are the reviews from the two midterm exams.
Read Sections 8.1 and 8.2 (pages 531-547).
We will look at these array methods today.
Here are the examples that we used in class today.
Thanksgiving Break. No class.
See the homework assignment page for your eighth (and last) assignment.
Read Sections 7.3 and 7.4 (pages 479-492).
Read Sections 8.1 and 8.2 (pages 531-547).
Do Self-Check Problems 14, 15, 16, 17, 19, 20, 21 on pages 517-519 of the textbook (solutions are here).
Here are the examples that we used in class today.
Read Section 7.2 (pages 465-479).
Solve these problems from the CodingBat web site.
Read Section 7.1 (pages 444-465).
Do Self-Check Problems 1, 3, 4, 5, 7, 10 on pages 516-517 of the textbook (solutions are here).
Do programming Exercise 1 from page 522.
Here are the example programs from Chapter 7 of the textbook.
Read Section 5.4 (pages 349-352).
Do Self-Check Problems 14, 17, 18, 19, 21, 22, 24, 25 on pages 375-379 of the textbook (solutions are here).
Do programming Exercise 13 from page 384.
Solve these problems from the CodingBat web site.
See the homework assignment page for your seventh assignment.
Read Section 5.3 (pages 333-348).
Do Self-Check Problems 1, 2, 5, 10, 11, 12, 13 on pages 371-375 of the textbook (solutions are here).
Do programming Exercises 1 and 7 from pages 381 and 382.
Here are the example programs from Chapter 5 of the textbook.
Here is the code we wrote today comparing while-loops with for-loops.
The second midterm exam is today.
For next week, read Chapter 5, Sections 5.1 and 5.2 (pages 316-333).
Remember that the second midterm exam will be this Wednesday, November 6.
Be sure to study the exam review.
Here are examples for today (for Section 4.4).
Remember that the second midterm exam will be a week from today.
See the review material from last Wednesday.
Do Self-Check Problems 27, 29 on page 308 of the textbook (solutions are here).
Here are examples for today (for Section 4.2).
Solve these problems from the CodingBat web site.
Here is a file that shows some important nested if-else-statement patterns.
Here are examples for today.
Solve these problems from the CodingBat web site.
See the homework assignment page for your sixth assignment.
The second midterm exam will be two weeks from today (on November 6). This is one week after the (tentative) date mentioned in the syllabus. I'm changing the date because of Monday's power failure.
Here is a summary of the midterm exam topics and some review/practice problems.
Read Chapter 4, Section 4.4 (pages 274-285).
Do Self-Check Problems 15, 17, 18, 19 on page 306 of the textbook (solutions are here).
Here are examples for today.
CLASS CANCELLED due to power failure.
Read Chapter 4, Section 4.2 (pages 254-265).
Here are the example programs from Chapter 4 of the textbook.
Do Self-Check Problems 1, 2, 4, 7, 8, 12, 13 on pages 301-305 of the textbook (solutions are here).
Solve these problems from the CodingBat web site.
For Wednesday, read Chapter 4, Section 4.1 (pages 239-253).
Do Self-Check Problems 23, 24, 25, 26 on pages 189-190 of the textbook (solutions are here).
Today we will look at these examples.
Here is the code we wrote today.
Do Self-Check Problems 18, 19, 20, 21 on pages 187-188 of the textbook (solutions are here).
Solve these "warmup" problems from the CodingBat web site. You will need to use the String class methods listed in Table 3.3 on page 167 of the textbook.
Here is the code we wrote today on Java Tutor.
Here is the interactive session that we did using DrJava.
Fall Break. No class.
See the homework assignment page for your fifth assignment.
Do Self-Check Problems 12, 13, 14, 15, 16 on pages 186-187 of the textbook (solutions are here).
For next Wednesday, read Section 3.3 (pages 160-172) from the textbook.
Here are the examples that we wrote in class today.
Here are the example programs from Chapter 3 of the textbook.
Do Self-Check Problems 6, 9, 10 on pages 184-185 of the textbook (solutions are here).
Here are the examples that we wrote in class today. Compare them with the code that we wrote last Monday.
The first midterm exam is today.
For next week, read Sections 3.1 and 3.2 (pages 137-160) from the textbook.
Remember that the first midterm exam is Wednesday. See the review sheet listed below.
Read Section 3.1 (pages 137-152) from the textbook.
Do Self-Check Problems 1, 2, 3, 4, 5 on pages 182-183 of the textbook (solutions are here).
Here are the examples that we wrote in class today.
Remember that the first midterm exam will be one week from today, on September 25. See the review problem given below.
Here is the "top-down" outline that we did in class for the checker board example from Examples-for-Sections_2.3-2.4.zip.
Here is the (not quite finished) window example from Examples-for-Sections_2.4-2.5.zip.
The first midterm exam will be one week from Wednesday, on September 25.
Here is a summary of the midterm exam topics and some review/practice problems.
Here are more example programs for Sections 2.4 and 2.5.
Here are the "top-down" outlines that we did in class for two of the code examples from Examples-for-Sections_2.3-2.4.zip.
See the homework assignment page for your fourth assignment.
Use the "Definitions Pane" in DrJava or the Java Visualizer to do Exercises 8, 20 and 21 on pages 129-131 of the textbook.
Today we will look at these example programs for Sections 2.3 and 2.4.
For Wednesday, read Section 2.5 (pages 110-118).
Do Self-Check Problems 34, 35, 36 on pages 126-128 of the textbook (solutions are here).
Here are our first examples with nested for-loops.
Here are more example programs for Sections 2.3 and 2.4.
See the homework assignment page for your third assignment.
For Monday, read Section 2.4 (pages 99-110).
Do Self-Check Problems 21, 22, 23, 28, 29, 30, 31, 32 on pages 123-126 of the textbook (solutions are here).
Use the "Definitions Pane" in DrJava or the Java Visualizer to do Exercise 2 on page 128 of the textbook.
Here are the versions of WriteSquares
that we wrote in class.
Here is the version of DrawBoxes
that we wrote in class.
Labor day. No class.
Remember that there is a copy of the textbook on reserve in the library.
For next Wednesday, read Section 2.3 (pages 89-99).
Do Self-Check Problems 9, 10, 11, 17, 19, 20 on pages 121-123 of the textbook (solutions are here).
See the homework assignment page for your second assignment.
I put a copy of the textbook on reserve in the library. You can borrow the book from the checkout counter near the library's entrance.
For Wednesday, read Section 2.2 (pages 74-89).
Do Self-Check Problems 1, 2, 5 on pages 119-120 of the textbook (solutions are here).
Exercise: Write code that can draw this picture without any repeated code.
Here is the solution we wrote in class, using the Java Visualizer.
For Monday, read Chapter 2, Section 2.1 (pages 64-74).
Here are the example programs from Chapter 2 of the textbook.
Do Self-Check Problems 21, 22, 23, 26, 29, 30, 32 on pages 50-54 of the textbook (solutions are here).
Use the "Definitions Pane" in DrJava to do Exercise 8 on page 55 of the textbook.
Here are links to the DrawBoxes
examples that we did in class using the Java Visualizer, both before and after we did "procedural decomposition".
How would you change these examples to draw three, or four, boxes? How would you change them to draw larger boxes?
Be sure to look at the homework assignment page. Your first assignment is already listed there.
On your home computer, install the Java 8 JDK and DrJava as described in these instructions.
Here is a brief DrJava Primer
For today, read Chapter 1, Sections 1.1 - 1.3 (pages 1-28) from the textbook.
For Wednesday, read Sections 1.4 - 1.5 (pages 28-46) from the textbook.
Here are the example programs from Chapter 1 of the textbook.
Here is a simple program that helps demonstrate the difference between DrJava's "Definitions Pane" and "Interactions Pane".
Use the "Interactions Pane" in DrJava (or this web page) to do Self-Check Problems 10, 11 and 12 on page 48 of the textbook (solutions to the Self-Check Problems are here).
Do Self-Check Problems 18 and 19 on page 49 of the textbook.
Use the "Definitions Pane" in DrJava to do Exercise 1 on page 54 of the textbook.