This page documents what we do in class. It contains Java programs that we will discuss in class, reading assignments from our textbook, simple homework exercises that you can work on for practice and exam preparation (not for credit), and links to other sources of information.
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.
- Wdnesday, December 9.
- Remember that the final is on Monday, December 14, at 1:00.
- For next semester, it would be a good idea for you to have a Java reference book where you can look up the Java definitions of ideas like inheritance, polymorphism, overriding, interfaces, files, and exceptions (which you will learn in C++). Here is a good choice.
- Monday, December 7.
- For Wednesday, read Chapter 12, Sections 12.1-12.3.2 (pages 387-399).
- Here is an example that shows how a "public interface" can have two different "private implementations". Each
Hat class below implements the same public interface, but they have very diferent private implementations of that public interface.
- Wdnesday, December 2.
- For Monday, read Chapter 11, Sections 11.6-11.10 (pages 366-381).
- Here is a collection of Power Point slides, prepared by the authors of the textbook, for the Chapter 11.
- Here is a sequence of examples that shows how we might build up a "public interface" that describes how a box could be modelled for a shipping company.
- Here is a sequence of examples that shows how we might build up a "public interface" that models a temperature reading in an unambiguous way.
- Monday, November 30.
- See the homework page for your ninth homework assignment.
- For Wednesday, read Chapter 11, Sections 11.1-11.5 (pages 343-366).
- Here is a collection of Power Point slides, prepared by the authors of the textbook, for the chapters about sound.
- If you want to create your own
.wav files from some mp3 files, a good tool for examining, converting, and editing sound files is the free program Wavosaur (Wavosaur is simpler than Audacity).
- Monday, November 23.
- For next Monday, read Sections 8.3-8.4 (pages 271-285), Section 9.4 (pages 304-306), and Sections 10.1-10.4 (pages 312-325).
- Here are some example sound programs.
- Here is a zip file containing three 30 second music (wav) files. These are a bit more interesting to work with than the examples from the textbook.
- If you want to create your own
.wav files from some mp3 files, a good tool for converting and editing sound files is the free, open source program Audacity.
- Wednesday, November 18.
- The second exam is today.
- For Monday, read Sections 8.1-8.2 (pages 252-271).
- Monday, November 16.
- Here are the two versions of the
scale() method that we worked on today in class.
- Wednesday, November 11.
- The second exam will be next Wednesday, November 18, one week later than what is stated in the syllabus.
- Here are some example programs from Chapter 7.
- Monday, November 9.
- The second exam will be on Wednesday, November 18, one week later than what is stated in the syllabus (because I was scheduled for jury duty this week).
- For Wednesday, read Sections 7.3 and 7.4.
- Here are some example programs from Chapter 7.
- Here are two examples "bitmapped vs. vector" graphics. You can view the "ps" and "eps" files using InfranView, which is in the
C:\cs123\tools\ folder. These are "PostScript" files.
- Here is an interesting news article on what research in "image processing" can lead to ("image processing" is the term used for the science of manipulating pixels in a picture).
- Wednesday, November 4.
- See the homework page for your eighth homework assignment.
- The sylabus says that the next exam is a week from today.But I have jury duty next week, so I am postponeing the exam by one week. So the second exam will be on Wednesday, November 18.
- Do the following practice problems from the end of Chapter 6 (pages 208-211): Problems 6.6, 6.8, 6.9, 6.17, 6.18, 6.19.
- For Monday, read Sections 7.1 and 7.2 (pages 212-230).
- Here is an example program for demostrating the jGRASP debugger.
- Here are some more example programs for Chapter 6.
- Monday, November 2.
- I have added the jGRASP Java developement environment to the cs123.zip file. I added this developement environment because jGRASP's debugger is much better than DrJava's debugger (you can read a brief explanation of DrJava's debugger in Section 11.2.6 (pages 352-356) of our textbook). Here is what you need to do to start using jGRASP and its debugger.
- Download the cs123.zip file onto your desktop, unzip it onto your desktop, and open the resulting
cs123 folder.
- Copy the sub-folder called
jGRASP to your C:\cs123\ folder.
- Copy the file called
jGRASP.exe to your C:\cs123\ folder (you double click on this file to start jGRASP).
- Copy the file called
jGRASP Tutorials.pdf to your C:\cs123\ folder.
- Read the jGRASP documentation about its debugger (this documentation is also part of the
jGRASP Tutorials.pdf file).
- If you want to use jGRASP with the Java classes from our textbook, you need to tell jGRASP where to find those classes (just as we did with DrJava). Use the jGRASP "Settings -> PATH/CLASSPATH -> Workspace" menu item and then in the resulting window click on the "CLASSPATH" tab. Then click on the "New" button. Click the "Browse" button next to the "Path or JAR File" textbox. Navigate to the
C:\cs123\ folder and select the bookClasses folder (but don't open that folder) and then click the "Choose" button. Then click on the "OK" buttons of the succesive windows.
- Wednesday, October 28.
- See the homework page for your seventh homework assignment.
- Read this interesting article about some emerging computer technologies.
- For Monday, read Sections 6.7 - 6.8 (pages 202-207).
- Here are some example programs for Chapter 6.
- Monday, October 26.
- For Monday, read Sections 6.3 - 6.6 (pages 186-202).
- Here is one more example program for Chapter 5.
- Wednesday, October 21.
- See the homework page for your sixth homework assignment.
- Do the following practice problems from the end of Chapter 5 (pages 170-172): Problems 5.1, 5.10, 5.11, 5.13, 5.15, 5.18.
- For Monday, read Sections 6.1 - 6.2 (pages 173-186).
- Here are some example Java programs that demonstrate the idea of "returning" a value from a method.
- Monday, October 19.
- For Wednesday, read Sections 5.2.3 - 5.3 (pages 155-170).
- Here are some example Java programs that use nested loops to modify pictures.
- Wednesday, October 14.
- Here are some example nested loops to think about.
- Monday, October 12.
- See the homework page for your fifth homework assignment.
- For Wednesday, read Section 5.2.2 (pages 149-155).
- Read this interesting New York Times story.
- Here are some example Java programs that use nested loops to modify pictures.
- Wednesday, October 7.
- Today was the first midterm exam.
- For Monday, read Sections 5.1 - 5.2.1 (pages 131-149).
- Monday, October 5.
- Remember that the first midterm exam for this course is this Wednesday (two days from today).
- Here are some example Java programs that use loops.
- Wednesday, September 28.
- Remember that the first midterm exam for this course is next Wednesday, October 7. The exam will be over the first four chapters of the textbook. Be sure to review the practice problems that are assigned below for each chapter.
- Here is a collection of Power Point slides prepared by the authors of the textbook. These can be used as a way to review the first four chapters of the textbook for the exam.
- Here are some example Java programs.
- Wednesday, September 28.
- See the homework page for your fourth homework assignment.
- Do the following practice problems from the end of Chapter 4 (pages 128-130): Problems 4.5, 4.6, 4.7, 4.9, 4.10, 4.13, 4.14, 4.15, 4.17.
- Here are some example Java programs.
- Wednesday, September 23.
- For Monday, read Sections 4.3.8 - 4.3.9 and 4.4 (pages 119-127).
- Here are some example Java programs.
- Monday, September 21.
- For Wednesday, read Chapter 4, Sections 4.3.4 - 4.3.7 (pages 109-119).
- Wednesday, September 16.
- See the homework page for your third homework assignment.
- For Monday, read Sections 4.3.1 - 4.3.3 (pages 91-109).
- I added some tools for working with pictures and pixels to the cs123.zip file, so you should download the zip file again and copy the new tools into your
C:\cs123\ folder.
- Monday, September 14.
- For Wednesday, read Chapter 4, Sections 4.1 - 4.2 (pages 76-91).
- Here are two example Java programs that demonstrate class vs object methods, and what we mean by the "state" of an object.
- Wednesday, September 9.
- See the homework page for your second programming assignment.
- For next Monday, read Chapter 3, Sections 3.6 - 3.7 (pages 59-71).
- Do the following practice problems from the end of Chapter 3 (pages 72-73): Problems 3.1, 3.2, 3.5, 3.7, 3.8, 3.9, 3.11.
- Here is an example Java program that demonstrates the difference between primitive variables and object variables (also called "reference variables").
- Wednesday, September 2.
- See the homework page for your first programming assignment.
- For next Wednesday, read Chapter 3, Sections 3.1 - 3.5 (pages 38-58).
- Here are some simple examples of Java programs.
- Monday, August 31.
- For today and Wednesday, read Chapter 1 and Chapter 2 from our textbook, "Introduction to Computing and Programming with Java, A Multimedia Approach".
- On your home computer, install Java and DrJava as described in these instructions.
- Here is a simple program that helps demonstrate the difference between DrJava's "Definitions Pane" and the "Interactions Pane".
- Use the "Interactions Pane" in DrJava to do Problems 2.10 - 2.15 from the end of Chapter 2 (page 36).
|
|