This course ended on December 14, 2011
CPSC 124: Introduction to Programming
Department of Mathematics and Computer Science
Hobart and William Smith Colleges
Instructor: David J. Eck (firstname.lastname@example.org)
Course Handout: http://math.hws.edu/eck/courses/cpsc124_f11.html
Monday, Wednesday, Friday, 10:10--11:05 AM
Room Gulick 206A.
Lab: Tursday, 11:55 AM -- 1:20 PM
Room Gulick 208
Office Hours, Lansing 313 (If I'm not there, check the lab, Lansing 310.):
TA Hours, Lansing 310: Sunday through Thursday, 7:00--10:00 PM.
|Lab 1, September 1
Intro to Linux and Java
|Lab 2, September 8
Input and Graphics
|Lab 3, September 15
Branches and Loops
|Lab 4, September 22
For loops (with Art)
|Lab 5, September 29
Try (plus applets)
|Lab 6, October 6
Eclipse (and subroutines)
|Lab 7, October 13
Lab 6 / Project 2, Cont.
|Lab 8, October 20
|Lab 9, October 27
Objects and Classes
|Lab 10, November 3
|Lab 11, November 10
Arrays and GUIs
|Lab 12, November 17
Events and Components
|Lab 13, December 1
Work on your final project
|Lab 14, December 8
Partially Full Array
|Quizzes and Tests, with Answers
|Quiz 1, Sept. 12
||Quiz 2, Sept. 19
||Quiz 3, Sept. 26
|Test 1, Oct. 3
||Quiz 4, Oct. 17
||Quiz 5, Oct. 24
|Quiz 6, Oct. 31
||Test 2, Nov. 7
||Quiz 7, Dec. 5
Some Useful Links
First Week: August 29 and 31; September 2
Welcome to the course. You should begin reading the textbook, which is available
on-line at http://math.hws.edu/javanotes. During the first week of the term,
we will go over some of the introductory material in Chapter 1
fairly quickly, and we will
start Chapter 2.
Although we will not cover all of Chapter 1 in class, you should definitely read the
In the lab this week, you will compile and run your first Java programs, and
you will be introduced to the Linux operating system.
Second Week: September 5, 7, and 9
As reading for the week, you should read the rest of Chapter 2.
We will not cover every topic in this chapter. In particular, the following sections are not required
reading: 2.3.3, 2.4.5, and 2.6. (Section 2.6 covers
programming environments, including the command line environment that was introduced in lab.)
You will learn about using the non-standard class TextIO, which allows your
programs to get input from the user. You'll learn more about standard subruotines and functions, including
some that can be used to work with strings. And the lab will introduce some subroutines for
Reminder: The first quiz will be next Monday.
Third Week: September 12, 14, and 16
We will finish up Section 2.5 on Monday,
and we will start in on Chapter 3.
We will do at least the first two sections. Section 1 introduces two control statements,
the if statement and the while statement. Section 2 talks about algorithms,
which are definite, step-by-step procedures for carrying out specific tasks. We'll talk
about how algorithms can be developed and how they can be expressed in Java.
There will be another quiz next Monday, September 19. It will cover Sections 2.5, 3.1, and 3.2.
Fourth Week: September 19, 21, and 23
This week, we will look at some other control structures: The
for loop, the do..while loop, and multi-way if
statements. We'll also continue our study of algorithm development.
The reading for the week is Chapter 3,
Sections 3, 4, and 5.
As usual, there will be a quiz next Monday, September 26. On the Monday after that, there
will be a test.
Fifth Week: September 26, 28, and 30
As reading for the week, you should finish Chapter 3. There are some topics in
that chapter that we will not do at all (such as anything related to enumerated
types). There are some things that you should know about, but that you will not
be forced to use in code (such as do..while loops, the continue statement, and switch
The first test will be given in class next Monday, October 3. It will
cover Chapters 1, 2, and 3 as well as Labs 1 though 4.
An information sheet is available and
will be handed out in class on Wednesday.
Sixth Week: October 3, 5, and 7
There is a test on Monday of this week.
(Next week, there is no class on Monday and hence no quiz.)
After the test, we will begin Chapter 4,
which covers subroutines. You should read sections 4.1, 4.2, and 4.3. For the lab this Thursday,
you will write some subroutines, but the main point of the lab will be to introduce the
Seventh Week: October 12 and 14
There in no class on Monday this week, because of Fall Break.
Next Monday, October 17, we will return to our custom of having
a quiz at the beginning of class.
On Wednesday and Friday, we will continue with Chapter 4: Subroutines.
You should read Sections 4.4, 4.5, and 4.6. (However, we will not get
to some of that material until next week.)
There is no new programming exercise for this week's lab.
You can work on Lab 6 or on Project 2. However, there is a
new non-programming assignment: You are to think about ideas for a final project
and write short proposals for two of your ideas.
Eighth Week: October 17, 19, and 21
We will finish up Chapter 4 this week. You should read the rest of that
chapter. We still have to talk about Section 4.6
and Section 4.7. 4.6 covers the use of
subroutines and APIs in program development. It introduces preconditions and postconditions.
4.7&nbps;fills in some details about variables, including scope, named constants, and
combining initialization with declaration.
Ninth Week: October 24, 26, and 28
The reading for the week is Chapter 5,
Sections 1, 2, and 3. This is the start of object-oriented programming. We will be talking
about constructors, instance variables, instance methods, null, pointers, and
getters and setters. And we will start talking about object-oriented design.
Tenth Week: October 31; November 2 and 4
There is a test coming up next Monday! An information sheet
The reading for the week is Chapter 5,
Sections 4, 5, and 6, which continue the study of objects and classes. We will only covert
parts of Sections 5 and 6, and those sections will not be on Monday's test.
Next week, after the test, we will spend a couple days on arrays, which are covered
in the book in Chapter 7.
Eleventh Week: November 7, 9, and 11
After the test on Monday, we will take a couple days to cover basic
material on arrays. You should read the following sections from
Sections 7.1, 7.2.1, 7.2.4, 7.2.5, 7.5.1, 7.5.2. We will cover
additional material from Chapter 7 at the end of the term.
You will use a two-dimensional array in the lab
for this week. In addition, you will build a complete GUI program from
scratch. The lab is more tutorial than usual. You should read it carefully.
Twelfth and Thirteenth Week: November 14, 16, 18, and 21
We will be continuing with arrays for the first part of the week.
There is no new reading on that topic. After that, we will go back
to Chapter 5 to pick up on some of the more advanced features of
classes and objects, including subclasses, class hierarchies,
abstract classes, interfaces, nested classes, and this and super. The reading on this
material includes Chapter 5,
Sections 5.5, 5.6.1, 5.7.1, and 5.7.2. We will will continue with this material
on Monday, November 21. There is no class or lab on November 23, 24, or 25
because of the Thanksgiving holiday.
Fourteenth Week: November 28 and 30; December 2
The last quiz of the semester will be on Monday of next week.
In the last two weeks of the course, we will be finishing up material from
Chapters 6 and 7. This week, it will be Chapter 6.
You will find that we have already covered much of that chapter. Ideally, you should read the
entire chapter, but here is a guide to the most essential reading about things we have not covered:
- Section 6.3.3 covers fonts.
- Section 6.4.3 covers how to work with modifier keys and the different mouse buttons.
- Section 6.4.4 covers dragging.
- Section 6.5.4 covers the important topic of state machines.
- Section 6.6 covers components. Although we have covered some of this material, I suggest reading the
entire section to learn more about various components, their methods, and their events.
- Section 6.7 covers layout. Again, we have covered parts of this briefly, but there is a lot
more detail here. This section includes coverage of borders and null layouts.
- Section 6.8.1 covers menus.
- Section 6.8.2 covers some standard dialog boxes, including JColorChooser and the
dialogs defined by the JOptionPane class.
For the lab this week, you can work on your final project. Remember that final projects should
be finished by the last day of classes. However, they will not actually be collected until the
day of the final exam, and you can add some finishing touches, if necessary, in the four days
between the end of classes and the exam.
Fifteenth Week and Exam: December 5, 7, 9, and 14
On Monday and Wednesday, we will cover a few more topics from
The reading is Sections 3 and 4 from that chapter. We have already covered some
material from these sections, and there are a few things that we will
not cover at all. The most important subsections are 7.3.1, 7.3.2, 7.4.1, 7.4.2,
The final exam is on Wednesday, December 14, at 8:30 AM, in our regular classroom.
An information sheet is available.