This course ended on December 14, 2001.
The labs can be downloaded using either of the following links:
http://math.hws.edu/eck/cs124/downloads/javalabs-fall2001.zip (Windows format text files)
http://math.hws.edu/eck/cs124/downloads/javalabs-fall2001.tar.Z (UNIX format text files)
(See the README file from the archive for more information.)
CPSC 124: Introductory Programming
Department of Mathematics and Computer Science Hobart and William Smith Colleges Fall, 2001. Instructor: David J. Eck (firstname.lastname@example.org) Monday, Wednesday, Friday, 3:00--3:55 PM. Room Lansing 300. Lab: Thursday 10:20--11:45 or 11:55--1:20. Library Multimedia Computer Lab. Course Handout: http://math.hws.edu/eck/courses/cpsc124_f01.html
- On-line textbook.
- About your Linux account
- Programming Assignments:
- Assignment 1: A Calendar Program
- Assignment 2: Drunkard's Walk
- Assignment 3: Mosaic Draw
- Assignment 4: Final Project
- Lab Worksheets:
- Lab #1: Meet the Computer, August 30
- Lab #2: Variables and TextIO, September 6
- Lab #3: Loops and Branches, September 13
- Lab #4: For Loops (and Some Graphics), September 20
- Lab #5: Animation, September 27
- Lab #6: Subroutines (and More Web Stuff), October 5
- Lab #7: Applets and Objects, October 12
- Lab #8: A Simple Class, October 19
- Lab #9: Applets and Events, October 26
- Lab #10: Silly Button, November 1
- Lab #11: Components and Layout, November 8
- Lab #12: "String args" at Last, November 15
- Lab #13: Making Bar Charts with Arrays, November 29
- Lab #14: A Two-Dimensional Array, December 5
- Information sheet for: First Test, Second Test, Final Exam
- Tests, with answers: First Test, October 1, Second Test, November 12
- Quizzes, with answers:
Quiz #1, September 10, Quiz #2, September 17, Quiz #3, September 24,
Quiz #4, October 15, Quiz #5, October 22, Quiz #6, November 5
Quiz #7, December 3
- FYI: Some old labs (from the Fall 1998 version of this course)
Labs and assignments for CS 124, as well as other information about the
course, will be posted below as the course is taught
during the Fall term of 2001.
End of Term: December 3 to 12
New December 6: The information sheet for the final exam is available.
We are in the last week of the term. There is a quiz on Sections 8.1 to 8.4 on Monday, December 3. We will cover Section 8.5, which we did not get to last week. After that, I will talk a little about material from Chapter 9, as a way of wrapping up the course. Although I encourage you to read Sections 1 through 3 of that chapter, you are only responsible for the bits that I cover in class.
The final lab of the term is on Thursday, December 13. This will be a short lab on two-dimensional arrays. You will get credit for being at the lab and completing the exercise. I will not collect any lab report for this lab. Your lab report for last week's lab is due in class on Wednesday, December 5.
The final exam is on Wednesday, December 12, at 8:30 AM, in our usual classroom. The exam is cumulative, with some emphasis on the material in Chapter 8 that we have covered since the second midterm. An information sheet for the exam will be posted on this page by December 7. I will have office hourse during the reading period and during the week of exams. I will announce them in class and post them on my office door.
Your final programming project is due at the final exam. However, if you ask for an extension, I will accept it the following afternoon. You should turn in a printout of your program, and you should make sure that I can access the program to try it out if necessary. If it is an applet, it should be on your Web page. If it is a stand-alone program, it should be in your cs124_homework direcotory. There only has to be one copy of a team project, but make sure that I know where it is.
Fourteenth Week: November 25 to November 30
We will continue to talk about arrays this week. You should read Section 8.5 and Section 8.4 (in that order -- we will talk about two-dimensional arrays before doing searching and sorting).
The final quiz, which will be given next Wednesday, December 3, will cover all of Chapter 8.
Twelfth and Thirteenth Weeks: November 12 to November 19
The second midterm exam will be given in class on Monday, November 12. An information sheet for the exam is available. A written proposal for your final project is due in class on Monday.
After the exam, we will begin Chapter 8, which covers arrays. We will spend five or six classes on this chapter. The reading for November 14 through 19 is Sections 8.1, 8.2, and 8.3.
The lab on November 15 will have a short introductory exercise on arrays. You should have time during the lab to continue work on last week's lab or to work on the third programming assignment.
Wednesday, November 21 through Friday, November 23 is Thanksgiving break. There is no quiz on the Monday after break. Enjoy the holiday!
Eleventh Week: November 5 to November 9
We will finish up our coverage of GUI programming this week, so that we can move on to arrays next week. You should look through Chapter 7, which covers some of the more advanced aspects of GUI programming. However, you will not be responsible for programming with most of the material from this chapter.
Since we have been working with graphics for a while, I do expect you to know how to write paint() methods that use the basic drawing commands from the Graphics class. Aside from this, you should be able to read and understand programs that use any of the material in Chapter 6, except for keyboard and focus events. This means that you should be able to look at programs that use this material and answer questions about it, but I will not ask you to write programs that use it on quizzes or tests. Note that this includes mouse events and simple uses of Buttons, BorderLayouts, and Panels.
For your final project and for lab exercises, you should be able to write programs that use any of the material in Chapter 6, including the use of BorderLayout, FlowLayout, Panels, and Buttons. You should be able to use the following standard components in at least their "passive" mode, without responding to the events that they generate: Label, Choice, TextFields, TextArea, Checkbox. You should know how to enable and disable buttons, and you should know how to make textfields non-editable. You should know about the Canvas class and how it is used to create "custom components."
For testing purposes, you should also be generally familiar with the terms "off-screen image," "layout manager," and "thread."
We will have a test next Monday which will cover material from Chapters 4 through 7. On the same day, a written final project proposal is due. I invite you to meet with me this week to discuss your final project. Please sign up for an appointment on the sign-up sheet outside my office door.
Tenth Week: October 29 to November 3
We fell a bit behind last week, so we are just getting started on Chapter 6. The reading for the week is Chapter 6, except for Section 6.7, which we won't cover at all. Chapter 6 covers the basic ideas of applets, GUI programming, and HTML. We have covered some of this on labs already, and we should be able to complete this chapter in one week.
Ninth Week: October 22 to 26
We will finish Chapter 5 this week and begin Chapter 6. The reading for the week is Chapter 5, Sections 5 and Chapter 6, Sections 1, 2, 3, and 4. You will find that most of the material in Sections 1 through 3 of Chapter 6 have already been covered in labs, and some parts of Section 4 will be covered in this week's lab. So, we won't be spending a lot of time on that material in class. There is some material in Section 5.5 that you are not responsible for (that is, it will not be on tests or quizzes). However, you should certainly know about extending classes, the special variable this and how to use existing interfaces. You do not need to know the syntax for creating your own interfaces.
Eighth Week: October 15 to 19
This week, we will continue talking about classes, objects, and object-oriented programming. The reading for the week is Chapter 5, Sections 2, 3, and 4. The quiz next Monday, October 22, will cover the first three sections of Chapter 5. Here are some of the terms and ideas that you should be familiar with for the quiz:OOP (Object-Oriented Programming) constructor objects parameters for constructors classes garbage collection instance of a class memory leak instance variables reusability of classes instance methods object-oriented analysis classes as types software life cycle the "new" operator the heap pointers null = operator for objects == and != for objects objects as parameters
The second programming assignment is now available, and is due on Monday, October 29.
Seventh Week: October 10 and 12
The reading for this shortened week is Chapter 4, Section 7 and Chapter 5, Section 1. Chapter 5 begins the study of objects and object-oriented programming. In the lab for this week, you will begin to work more seriously with objects.
The quiz next Monday will be on Chapter 4. Here is a list of some of the important terms and ideas in that chapter:black box toolbox interface API implementation package subroutine definition "import" statement subroutine call statement subroutines and program design formal parameter top-down design actual parameter bottom-up design return type final variable "return" statement named constant local variable scope
Sixth Week: October 1 to 5
After the test on Monday, we will continue to cover subroutines. The reading for the week is Chapter 4, Sections 4, 5, and 6.
The first programming assignment is due on Friday. It will be considered on-time if your program is finished and printed out by midnight on Friday. Programs turned in up to one week late will be subject to a 20% penalty. Programs will not be accepted more than one week late. In addition to turning in a printout of your program, you need to make it available for me to run. you should copy your program into the directory cs124_homework in your home directory. Make sure that this directory includes: Your Java source code file, your compiled class file, and the compiled file TextIO.class. Once your program has been submitted, I reserve the right to have you come in and discuss it with me before I grade it. Your grade might be partly based on such an interview.
There is no class next Monday, because of the two-day break next week. There is no quiz next week. A combined lab report for labs 5 and 6 will be due next Friday, October 12.
Fifth Week: September 24 to 28
On Monday, we will finish up Chapter 3 and talk about the programming assignment that is due next week. The lab will be about animation in applets and will be based on Section 3.7 We will begin Chapter 4 on Wednesday. The new reading for the week is Chapter 4, Sections 1, 2, and 3. (Note, however, that this material is not covered on next week's test.)
There is test coming up next Monday, October 1. The test covers Chapters 1, 2, and 3 from the textbook and Labs 1, 2, 3, and 4. Because of the test and the programming assignment that is due on October 5, there will be no lab report due next week. Lab 5 will have only one exercise, which you should try to finish during the lab period. The lab reports for Labs 5 and 6 will both be due during the following week.
Fourth Week: September 17 to 21
The reading for the week is Chapter 3, sections 4 through 7. We will cover the details of all five control structures in Java: if, while, do..while, for, and switch. More important, we will continue to consider how to develop algorithms, and we will look at a lot of examples.
The quiz next Monday will cover Chapter 3, Sections 3, 4, 5, and 6.
Third Week: September 10 to 14
For this week, you should read Chapter 3, Sections 1, 2, and 3. We will be talking about branches and loops and how they can be used to write complex programs. In fact, though, the main topic for the week is how to develop algorithms. The question is, how do you go about finding a program to solve a give problem? Learning the tools (if statements and while statements) is not the hardest part. The hardest part is always learning how to apply the tools you've learned.
The quiz next Monday will cover Chapter 2, Section 5 and Chapter 3, Sections 1 and 2.
Second Week: September 3 to 7
The reading for this week is Chapter 2. I hope to cover almost all of this chapter this week. You should read the chapter carefully. You are responsible for all the material in the book, even though I will not cover every detail in class. I suggest that you take the sample quiz and check the answers on the Web. To learn to program, you have to write programs. There are programming exercises at the end of the chapter. Solutions are available on line. It would be a good idea to try to work on some of these exercises before you look at my solutions. It's a good idea to look at my solutions whether or not you work on the exercises, since the solutions include some suggestions about how to approach programming problems.
The on-line version of the text contains working applets that cannot, of course, be shown in the printout. You will have to go on-line if you want to try out the applets.
There will be a quiz in class next Monday, September 10. It will cover the first four sections of Chapter 1 and the first three or four sections of Chapter 2 (depending on exactly how far we get).
First Week: August 27 to 31
We will cover Chapter 1 of the textbook and begin Chapter 2. Chapter 1 is an introductory chapter, which contains both background material and a survey of the material that will be covered in the rest of the course. I expect you to read the chapter, but you should not expect to understand the details completely. We will spend the rest of the term filling in the details.
You can begin reading the text on line. I will give out a hard copy in class on August 29. (The $20 fee for this course covers the cost of reproduction.) The hard copy is provided as a convenience. It is important that you also use the on-line version, which contains additional information: working applets, answers to end-of-chapter quizzes and programming exercises, and source code for all the examples.
I also expect you to read the course handout, which acts as a contract for the course.
The lab this week will be an introduction to the computing system you will be using in the course. I encourage you to read the worksheet in advance of the lab. Homework for the week consists of the reading and the lab report for this lab. The lab report is due next Wednesday, in class. Remember that homework is not ordinarily accepted late.