Class Lectures and Reading Assignments
CS 12300
Programming I: Java
Fall, 2017

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.

The final exam is Monday, December 11.

Here is the list of review/practice problems for the materail that we have covered since the second exam. You should also study the review problems for Exam 1 and Exam 2.

Here is a link to the example we created in class today.

From Chapter 8, read Sections 8.1 and 8.2 (pages 590-620).

Here are the example programs from Chapter 8 of the textbook.

You should also read the following two explanations of classes and inheritance (from this online "textbook").

No class: Thanksgiving break.

From Chapter 6, read Sections 6.2 (pages 399-418), 6.4 and 6.5 (pages 430-449).

Read Chapter 5, Section 5.2 (pages 299-327) from the textbook.

Be sure to carefully read the section about "Encapsulation" on pages 322-325. This is one of the most important ideas in all of Computer Science.

The second midterm exam is today.

See the homework page for your sixth programming assignment.

For next week, read Chapter 6, Section 6.1 (pages 384-399).

Here are the example programs from Chapter 6 of the textbook.

Here is the Address example that we used in class today.

Read

The second midterm exam will be one week from Wednesday, on November 8.

Here is a list of review/practice problems for the midterm exam.

This week we will study Java classes, objects, instance variables (fields), and instance methods.

Read just pages 1 - 15 from Section 7.1 in the following chapter about Java objects and classes (from this online "textbook").

Here is the Address example that we used in class today.

Read

Here are some examples of Java classes.

Read Chapter 5, Section 5.1 (pages 268-299) from the textbook.

Here are the example programs from Chapter 5 of the textbook.

Here is the code that we wrote in class.

Solve these CodingBat problems.

Today we will look at the code in the ArrayMethods.java file from the arrays.zip file.

Solve these CodingBat problems.

Read Sections 5.1, 5.2 and 5.3 (pages 1 - 21) in the following chapter about arrays (from this online "textbook").

Here are the DrJava interactions from today's class.

Here are some examples of Java arrays.

Solve these CodingBat problems.

See the homework page for your fifth programming assignment.

Read this nested for-loop example.

Solve these CodingBat problems.

Read Chapter 4, Section 4.2 (pages 226-245).

Use the Java Visualizer web site to do Self-Test Exercises 17, 18, 19 and 20 on pages 238-239.

Use the Java Visualizer web site to do Self-Test Exercise 22 on page 244.

Here is the example we worked on in class today. As an exercise, you should write the fourth version of the printTriangle() method.

See the homework page for your fourth programming assignment.

Use the Java Visualizer web site to do Self-Test Exercises 1, 3 and 5 on pages 214 - 215.

Use the Java Visualizer web site to do Self-Test Exercises 7, 9, 10, 11 and 12 on page 225.

I was given the following handout by the Student Academic Support office. This office is another campus resouce for you to get help with this course (or your other courses).

The first midterm exam is today.

For next week, read Chapter 4, Section 4.1 (pages 200-226).

Here are the example programs from Chapter 4 of the textbook.

Read the following chapter (from this online "textbook") about loops.

The first midterm exam will be Wednesday.

Today we will solve some "warmup" problems from the following web site.

The first midterm exam will be one week from Wednesday.

Here is a list of review/practice problems for the midterm exam.

Here are some examples of Java methods.

Here is a file that shows some important if-else-statement patterns.

This file has the examples that we worked on in class.

From Chapter 3, read Section 3.2 (pages 169-175).

Use DrJava's Interactions Pane to do Self-Test Exercises 12, 13, 14 on page 175.

Read the following chapter (from this online "textbook") about Java methods.

See the homework page for your third programming assignment.

Use DrJava's Interactions Pane to do Self-Test Exercises 6 and 7 on page 158.

Read this alternative explanation of conditional statements from this online "textbook".

We will finish Section 3.1 on Wednesday.

Here are copies of the interactions we did in class today for Section 3.1.

Here are copies of the work that we did in class today to solve Self Test Question 30 on page 102 of our testbook.

From Chapter 3, read Section 3.1 (pages 140-167).

Use DrJava's Interactions or Definitions Pane to do Self-Test Exercises 1, 3, 5 on page 157.

Use DrJava's Interactions or Definitions Pane to do Self-Test Exercises 10, 11 on page 167.

Here are the example programs from Chapter 3 of the textbook.

Labor day. No class.

For next Wednesday, read Chapter 2, Section 2.4 (pages 103-109).

Use DrJava's Interactions Pane to do Exercises 2, 3, 4, 6, 9, 10 on pages 127-128 at the end of Chapter 2.

See the homework page for your second programming assignment.

For Wednesday, read Chapter 2, Sections 2.2 and 2.3 (pages 81-102).

Here is a DrJava history file of what we did in class last Wednesday. You can download it to your desktop and then load it into DrJava's Interaction Pane to review what we did in class.

Experiment with this program visualization of the code from page 87 of the textbook.

Use DrJava's Interactions Pane to do all the Self Test Questions on page 90.

Experiment with this program visualization of the code from page 95 of the textbook.

Use DrJava's Definitions Pane (or this web page) to do Self Test Question 30 on page 102.

For next Monday, read Chapter 2, Section 2.1 (pages 48-81).

Use DrJava's Interactions Pane to do Self Test Questions 1 - 16 in Section 2.1.

Here are the example programs from Chapter 2 of the textbook.

Experiment with this program visualization of the code from page 49 of the textbook.

Experiment with this program visualization of the code from page 59 of the textbook.

Experiment with this program visualization of the code from page 77 of the textbook.

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.

For today and Wednesday, read Chapter 1, Sections 1.1 - 1.3 (pages 2-29) from the textbook.

Here are the example programs from Chapter 1 of the textbook.

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 (or this web page) to do Self Test Questions 11 and 12 on page 19 of the textbook (solutions to the Self Test Questions are on pages 43-45).

Use the "Definitions Pane" in DrJava to do Self Test Question 15 on page 19 of the textbook

Use the "Interactions Pane" in DrJava to do Exercises 6 and 7 on page 40 of the textbook.

Use the "Interactions Pane" in DrJava (or this web page) to do Exercise 8 on page 40 of the textbook.

Use the "Definitions Pane" in DrJava to do Practice Programs 2, 3, and 4 on page 42 of the textbook.