This course ended on May 10, 2010

CPSC 225: Intermediate Programming

   Department of Mathematics and Computer Science
   Hobart and William Smith Colleges

   Spring 2010.

   Instructor:  David J. Eck  (

   Course Handout:

   Monday, Wednesday, Friday, 12:20--1:15, Room Napier 201.
   Lab:  Thursday, 11:55 to 1:20, Library Multimedia Lab.

Lab 1, January 21
Spellchecking (plus Eclipse)
Lab 2, January 28
Sorting Benchmarks
Lab 3, February 4
Recursive Sentences and Fractals
Lab 4, February 11
List Exercises (with Turing Machines)
Lab 5, February 18
Binary Tree for "Twenty Questions"
Lab 6, February 25>
CVS / Debuggiong
Lab 7, March 4
Web Collage Part 1
Lab 8, March 11
Web Collage Part 2
Lab 9, March 25
Designing a GUI program
Lab 10, April 1
Mostly Files
Lab 11, April 8
Work on Final Project
Lab 12, April 15
Web Server
Lab 13, April 22
Back to GUI
Lab 14, April 29
Work on Final Project

Some Links:

End of Term: May 3 and 9

The last day of class is Monday, May 3. The final exam is Sunday, May 9, at 1:30 PM. You should be able to demonstrate your final project in class on May 3, and you should turn it in by 9:00 AM on Monday, May 10.

An information sheet for the final exam is available.

Week 14: April 26, 28, and 30

In this last full week of chapters, we will finish Section 12.3 and Section 12.4, and we look briefly at some of the ideas from Section 12.5. The most important topic for the week is the MVC (Model/View/Controller) pattern, and its application in Swing components such as JList.

For the lab this week, you can work on your final project. Remember that your final project should be completed by Monday, May 3, so that it can be demonstrated in class on that day. After that, if you have any clean-up or further work to do, you can continue working on the project until the final exam, which is scheduled for Sunday, May 9.

Week 13: April 19, 21, and 23

We will continue with Chapter 12 this week, covering advanced GUI programming. The reading for the week includes Sections 1, 2, and 3 in that chapter. In the lab, you will return to the GUI program that you worked on in Labs 9 and 10. You should, of course, be hard at work on your final project!

Week 12: April 12, 14, and 16

We will finish up Chapter 11 on Monday. After that, for the rest of the semester, we will be working on Chapter 12.

In the lab this week, you will write a multi-threaded web server.

Week 11: April 5, 7, and 9

There is a test on Wednesday. An information sheet is available.

In class this week, we will be working on networking and network programming with sockets. The reading is Section 11.4 and Section 11.5.

Last week's lab is not due until Saturday morning, April 10. There will not be a new lab this week. For the lab period on Thursday, you can work on your final project (or, if prefer, on Lab 10).

Week 10: March 29 and 31; April 2

We will be working on Chapter 11 this week, covering files on Monday and Wednesday and hopefully moving on to networking by Friday. In the lab for this week, you will continue working on the GUI project that you started last week. The main point of the lab will be to implement file saving and loading.

There is a test coming up next week, on Wednesday, April 7.

Week 9: March 22, 24, and 26

We will finish all the material that I plan to cover in Chapter 10. We will be looking at hash tables and their implementation (Section 10.3.3). On Wednesday, we will take a short look at writing generic classes (Section 10.5.1 and maybe a bit of Section 10.5.4), but we will cover only the simplest cases of this (and it is unlikely that you will ever have to go even that far into writing generic classes in the real world).

After we finish with Chapter 10, we will move on to Chapter 11 to learn about input/output, files, and networking in more detail.

In the lab for this week, you will start a project in GUI programming that will be continued in some future labs.

Week 8: March 8, 10, and 12

Information about the final project is available.

After our excursion into threads, images, and URL's, return to the main linear sequence of topics. We will begin Chapter 10, which covers generic programming and the Java Collection Framework. The reading for the week is Sections 10.1 through 10.3.1 (but you can omit 10.2.4).

Next week is Spring Break. Have Fun!

Week 7: March 1, 3, and 5

This week, we are working on topics related to the "web collage" project that you will start in lab. We will discuss the ArrayBlockingQueue class, which can be used for easy communication between threads, on Monday. On Wednesday, we will discuss the BufferedImage class. On Friday, we should finish up any further material that is needed for the project.

You can read about BufferedImages and try out a simple paint program that uses them in Section 12.1.1.

Week 6: February 22, 24, and 26

There is a test this week, on Wednesday, February 24. An information sheet is available.

We should spend most of the day on Monday going over old material before the test. The lab on Thursday will be an introduction to two programming tools, CVS and the Eclipse debugger. On Friday, we will be starting a project that will involve networking and threads. We will be spending some time covering the necessary material in class. The first reading for this material is on threads, Section 8.5. This will all be a break from data structures, before we move on to Chapter 10.

Week 5: February 15, 17, and 19

The main topic for the week is binary trees, Section 9.4. We will cover the structure of binary trees, recursive tree traversal, binary sort trees, and the analysis of binary sort tree algorithms. Time permitting, we will also cover expression trees.

Remember that there is a test coming up next week, on Wednesday, February 24.

Week 4: February 8, 10, and 12

We will finish up linked lists on Monday. After that, we will covert two important abstract data types, queues and stacks. This material is from Section 9.3.

The lab this week consists of several exercises on singly and doubly linked lists. In this case, the lists are used in an implementation of Turing machines, which are simple abstract computing devices that are used in theoretical computer science.

Week 3: February 1, 3, and 5

We start the week still on the topic of recursion. We'll look as some more examples, including the famous QuickSort sorting algorithm. The lab this week is about recursion -- with some examples that I think are fun

We will finish up recursion on Wednesday and then move onto Section 9.2. We will start with the basic idea of linked data structures, and we'll talk about the concept of an abstract data type (ADT) before going on to study the specific data type list. (ADTs are actually introduced at the beginning of Section 9.3.)

Week 2: January 25, 27, and 29

We will start the week where we left off, looking at Big-Oh/Big-Omega analysis of the run time of algorithms. We will cover Merge Sort as an example of a sorting algorithm that has Ω(n*log(n)) run time. For Thursday's lab, you will do some benchmarking of sorting algorithms.

We will spend a bit of time talking about earlier material from Chapter 8. I will talk briefly about the idea of writing "robust" programs, but aside from knowing what robustness means, you aren't responsible for Sections 8.1 and 8.2. (You might want to read them anyway.) We will spend some time on Section 8.3, which covers the full complexity of the try..catch..finally statement, but this is also not a major point.

By Friday, we should be able to start Chapter 9, recursion and linked data structures. These are two of the most central topics in the course (linked data structures more so than recursion), and we will spend about five weeks on this one chapter. For now, you can start reading Section 9.1, on recursion.

Week 1: January 20 and 22

This shortened three-day week is an introduction to the course. We will begin with an overview of the course and maybe a little review on Wednesday. On Friday, we will move directly to Section 8.6 in the textbook, Analysis of Algorithms. This section discusses the efficiency of algorithms in terms of the amount of time that they take to run for an input of a given size. This is an important consideration that we will use throughout the course when evaluating algorithms. Next week, after finishing Section 8.6, we will go back and consider some of the other sections in Chapter 8.

The lab on Thursday will include an introduction to the Eclipse integrated development environment for those of you who haven't used it previously. There will be a program for you to work on (spellchecking a word), plus an assignment dealing with analysis of the spellchecking algorithm.