Class Lectures and Reading Assignments
CS 12300-001
Programming I: Java
Fall, 2023

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.

Remember that the final exam for this class will be on Monday, December 11, from 12:30 - 2:30. Below is a summary of the final exam topics and some review/practice problems along with the previous two midterm exam review problems.

Here are examples that demonstrate constructors from Section 8.7.

Here are the code examples that we wrote in today's class.

Lab Exercise: Solve the following problem.

Read Sections 8.7, 8.8, 8.14, from the textbook. Do all the "Participation Activities" and "Challenge Activities" in each section.

Here are examples that demonstrate the CashRegister class from Sections 8.3, 8.5, and 8.6.

Lab Exercises: Solve each of the following problems.

According to the university's final exam schedule, the final exam for this class will be on Monday, December 11. Below is a summary of the final exam topics and some review/practice problems along with the previous two midterm exam review problems.

Read Sections 8.5, 8.6, from the textbook. Do all the "Participation Activities" and "Challenge Activities" in each section.

Here are examples that explain the Counter class and Counter objects from Section 8.2.

Lab Exercises: Solve each of the following problems.

Read Sections 8.1, 8.2, 8.3, from the textbook. Do all the "Participation Activities" and "Challenge Activities" in each section.

Here are the code examples from today's class.

Lab Exercises: Solve each of the following problems.

No class. Thanksgiving break.

Read Sections 6.12, 6.13, from the textbook. Do all the "Participation Activities" and "Challenge Activities" in each section.

Here are the code examples from today's class.

Lab Exercises: Solve each of the following problems.

Read Sections 6.7, 6.9, 6.10, from the textbook. Do all the "Participation Activities" and "Challenge Activities" in each section.

Here are the code examples from today's class.

Lab Exercises: Solve each of the following problems.

Read Sections 6.4 (compare it with Section 4.10), 6.25, 6.26, from the textbook. Do all the "Participation Activities" and "Challenge Activities" in each section.

Here are the code examples from today's class.

Lab Exercises: Solve each of the following problems.

The second midterm exam is today.

There will not be any Lab sessions today.

For next Monday, read Sections 6.1, 6.3, from the textbook. Do all the "Participation Activities" and "Challenge Activities" in each section.

The second midterm exam will be this Wednesday, November 8. See the review problems.

Here are the code examples from today's class.

Lab Exercises: Solve each of the following problems.

The second midterm exam will be one week from today, on Wednesday, November 8. See the review problems from last Wednesday.

For next week read Sections 5.5, 5.7, 5.8, from the textbook. Do all the "Participation Activities" and "Challenge Activities" in each section.

Here is a good explanation of how to do the hourglass pattern from Monday's lab.

Here are the code examples from today's class.

Lab Exercises: Solve each of the following problems.

Remember that the second midterm exam will be on Wednesday, November 8.

For Wednesday, read Sections 5.3, 5.4, from the textbook. Do all the "Participation Activities" and "Challenge Activities" in each section.

Here are the code examples from today's class.

Lab Exercises: Solve each of the following problems.

The second midterm exam will be two weeks from today, on November 8.

Here is the summary of the midterm exam topics and some review/practice problems.

For next week read Sections 4.16, 5.1, 5.2, from the textbook. Do all the "Participation Activities" and "Challenge Activities" in each section.

Here is a collection of ascii art patterns that make good practice problems for nested for-loops.

Here are the code examples from today's class.

Lab Exercises: Solve each of the following problems.

Continue to work on Sections 4.13, 4.29, from the textbook. Do all the "Participation Activities" and "Challenge Activities" in each section.

Here are the code examples from today's class.

Lab Exercises: Solve each of the following problems.

For next week, read Sections 4.13, 4.29, from the textbook. Do all the "Participation Activities" and "Challenge Activities" in each section.

Here are the code examples from today's class.

Lab Exercises: Solve each of the following problems.

For Wednesday, read Sections 4.11, 4.12, 4.13, 4.29, from the textbook. Do all the "Participation Activities" and "Challenge Activities" in each section.

Here are the code examples from today's class.

Lab Exercises: Solve each of the following problems.

For next Monday, read Sections 4.5, 4.6, 4.10, 4.28, from the textbook. Do all the "Participation Activities" and "Challenge Activities" in each section.

Here are the code examples from today's class.

Lab Exercises: Solve each of the following problems.

No classes today. Fall break.

The first midterm exam is today.

There will not be any Lab sessions today.

We don't have class on Monday because it is Fall Break.

For next Wednesday, read Sections 4.1, 4.3, 4.4, 4.23, from the textbook. Do all the "Participation Activities" and "Challenge Activities" in each section.

Remember, the first midterm exam is this Wednesday, on October 4.

Here is the summary of the midterm exam topics and some review/practice problems.

Here are the code examples from today's class.

Lab Exercises: Solve each of the following problems.

Remember that the first midterm exam will be next Wednesday, on October 4. See the review problems from last Wednesday.

For Monday, read Sections 3.36, 3.39 from the textbook. Do all the "Participation Activities" and "Challenge Activities" in each section.

Here are the code examples from today's class.

Lab Exercises: Solve each of the following problems.

For Wednesday, read Sections 3.18, 3.26, 3.27, 3.28, 3.29, 3.30 from the textbook. Do all the "Participation Activities" and "Challenge Activities" in each section.

Here are the code examples from today's class.

Lab Exercises: Solve each of the following problems.

The first midterm exam will be two weeks from today, on October 4.

Here is a summary of the midterm exam topics and some review/practice problems.

For next Monday, read Sections 3.13, 3.15, 3.16, 3.17, 3.42 from the textbook. Do all the "Participation Activities" and "Challenge Activities" in each section.

Note: Today's lab exercises require access to the zyBooks textbook. If you do not yet have access to the textbook, then please see me.

Here are the code examples from today's class.

Lab Exercises: Solve each of the following problems.

No class, or lab, today.

Because of problems with the textbook, I have postponed the first midterm exam by one week. So the first exam will be on Wednesday, October 4.

For next Wednesday, read Section 3.8, Section 3.10 and Section 3.25 from the zyBooks textbook. As you read each section, do all the "Participation Activities" and "Challenge Activities" in that section.

We will not have class, or lab, next Monday.

Here are the code examples from today's class.

Lab Exercises: Solve each of the following problems.

For Wednesday, read all the sections from Section 3.1 through 3.6 from the zyBooks textbook. As you read each section, do all the "Participation Activities" and "Challenge Activities" in that section.

To get some practice with how zyLabs work in the zyBook, go to the homework assignment page and do Assignment 0.

Here is a list of String methods that we can use in class today.

Here are the code examples from today's class.

Lab Exercises: Solve each of the following String problems using this brief help sheet of String methods and this longer help sheet of String methods.

For next Monday, read the following sections about method parameters and method return values.

Today we will look at simple examples of Turtle graphics using this help sheet of Turtle methods.

Here are the Turtle code examples from today's class.

Lab Exercises: Solve each of the following Turtle graphics problems using this help sheet of Turtle methods.

No class. Labor day.

For next Wednesday, read the following sections about objects, constructors, and methods.

We don't have class on Monday, Labor Day.

Here are the code examples we used in class today.

Lab Exercises: First, solve each of the following output formatting problems using this help sheet (and this one).

Then, solve the following Scanner input problems. You need to be aware of the "Scanner bug". You should use the Scanner methods nextInt(), nextDouble(), next(), nextLine(). Show me your result when you finish each one.

Today we will talk about using expressions to assign a value to a variable.

For Wednesday, read these explanations of how a Java program can assign values that come form outside the program (input values).

Here are the code examples we used in class today.

Here are some notes from today's class.

Lab Exercises: First, solve each of the following "Mixed up code" problems:

Then, solve the following coding problems. Show me your result when you finish each one.

Today we will talk about variables, data types, and operators. Since we do not yet have access to the textbook, here is a section about variables from a different textbook.

Here is another explanation of variables.

For next week, read this section about expressions.

Here is the example code we used in class today.

Lab Exercises: First, debug and fix this program. Show me your result when you are done.

Then debug this program. Show me your result when you are done.

For today, read Sections 1.1 to 1.6 from the textbook on either Brightspace or zyBooks.

For Wednesday, read Section 1.7 from the textbook.

Here are the code examples that we used in class today. You do not need to understand the details of these examples. Just use the Java Visualizer's "Visualize Execution" button and then the "Forward" button to watch the code execute.

Lab Exercise: Open, in a new browser tab, this HelloWorld program at the Java Visualizer. Make each of the following changes in the program (one at a time). After you make a change, compile and run the program and read the error message (if there is one). Then undo the change in the code and try the next change.