CPSC 125: Intermediate Programming

     Department of Mathematics and Computer Science
     Hobart and William Smith Colleges

     Spring, 1998.

     Instructor:  David J. Eck.

     Monday, Wednesday, Friday, 12:00--1:10 PM, in Room Lansing 300.

About The Course

This course is meant to continue the study of programming that was begun in CPSC 124. The programming language that we will use is C++, which is currently the most widely used language among professional programmers. C++ has a lot in common with Java, the language that was used in CPSC 124. (For an overview of C++ from the point of view of a Java programmer, I encourage you to read "From Java to C++," a chapter in an on-line text that I wrote to use in CPSC 124. You can access it on the Web at http://math.hws.edu/eck/cs124/notes/c9/index.html.)

By the end of the course, you will have encountered most of the major features of C++. This will include pointers, recursion, file I/O, templates, and some pointer-based data structures such as linked lists and trees. Some of you might be a bit disappointed to learn that you will be doing little, if any, graphics programming in this course. C++ does not have any standardized graphics capabilities. But don't worry -- we'll have plenty of other things to do.

The text for this course is Practical C++ Programming, by Steve Oualline. This book is meant to be an introduction to C++ for the "beginning programmer." Since you already know Java, there are large parts of this book that you can work through very quickly and without too much help from me. On the other hand, there are other sections that cover important programming concepts in a rather introductory and superficial way. So, in many cases, I'll have to expand somewhat in lecture on what's in the book. The book also contains a few typographical and substantial errors. Nevertheless, I was happy to find a generally readable and sensible book on C++. (It wasn't easy!)


Computer Ethics Readings and Paper

In addition to the programming text for this course, we will also be reading parts of the book Computer Ethics: Cautionary Tales and Ethical Dilemmas in Computing, by Tom Forester and Perry Morrison. Computer ethics is an important part of the training of any computer scientist, as is emphasized in the curriculum guidelines of professional computing societies. The book that we are using shows that this important topic doesn't have to be dull or dry. There are lots of interesting stories, and I think you'll enjoy reading them. We'll discuss the readings in class. You will write a short (three or four page) paper in the general area of ethical and societal issues in computing, based on the readings and additional research. More information about the paper will be forthcoming later in the course.


UNIX

Traditionally, computer professionals have done much of their work on large computers or workstations running the operating system known as UNIX. While Windows NT is growing in popularity, familiarity with UNIX is still a useful skill. You'll have the chance to develop that skill in this course, since a lot of the programming that you do for the course will be done in a UNIX environment.

For this course, you will have an account on a UNIX workstation, and you will be using the g++ compiler to compile your programs. This is the same programming environment that is generally assumed in the text, Practical C++ Programming. I will also hand out some additional material on UNIX. I will tell you what you need to know for the course, but what I tell you will be a very small part of what there is to know about UNIX. If you are interested, I encourage you to find out more on your own -- for example, from a book such as UNIX in a Nutshell.

Your UNIX account will be on the computer named eck.hws.edu. This is my office computer, which I have set up to run Linux for this term. (Linux is a free version of UNIX.) The files on this computer are not backed up. To be careful, you should keep your own backups. You should also be aware that as "System Administrator" for eck.hws.edu, I have full access to your account and to any files on this account. Occasionally, I will use this access to look at the programs you have written.


Programming Assignments

Programming assignments are an important part of the course. There are two types of assignments: basic weekly assignments and major projects. Each week, I will assign one or more short programming exercises. These are individual exercises that you should do entirely on your own. (To some extent, these exercises take the place of labs and quizzes.)

In addition to the weekly programming exercises, there will be four major programming projects. You have the option of working with someone else in the class on these projects. If you choose to work with a partner, then you and your partner should turn in a single program between you. I expect that the first three projects will deal with recursion, text processing and file I/O, and data structures using pointers. You will choose your own final project -- and it's not too soon to begin thinking about what you might want to do!

Important note: Programming assignments will not ordinarily be accepted late (unless you have a very good excuse). If you don't have a program finished on time, you should turn in what you have.


Getting Help

I encourage you not to be shy about asking for help! Come to my office when you need help with the course material or with your programs. The "math intern," Lynn Robitaille, can also offer help with the course. And if you find that you need even more help than she and I can give, you can ask Lynn to set you up with a tutor.


Tests

There will be two in-class tests, which will be given on Wednesday, April 22 and on Friday, May 15. There will also be a cumulative final exam, which will be given during the regularly scheduled final examination period, at 8:30 AM on Wednesday, June 10. The final exam will be in our regular classroom. Tests might include some questions based on readings from Computer Ethics.


Grading

Your numerical grade for the course will be determined as follows:

             First Test:               15%
             Second Test:              15%
             Final Exam:               25%
             Programming Assignments:  35%
             Paper:                    10%

My scale for converting numerical grades into letter grades is:

             A:  90% to 100%
             B:  80% to 89%
             C:  65% to 79%
             D:  50% to 64%
             F:  less than 50%

Grades near the bottom or top of a range are modified by a minus or plus. I follow this scale fairly strictly, although I occasionally "curve" a test by adding some points to each person's score, if I judge that the original grades on the test do not accurately reflect the performance of students in the class.


Office Hours, Email

My office is room 301 in Lansing Hall, just next door to our regular classroom. My office phone extension is 3398. I am on campus most days, and you are welcome to come in anytime you can find me there. I will announce office hours and post them on my office door as soon as my schedule is determined, but note that your office visits are not restricted to my regular office hours.

My email address is ECK. Email is good way to communicate with me, since I usually answer messages within a day after I receive them.


Schedule

Here is the schedule that I have planned for the course. I expect to stick pretty much to this schedule, but I will make adjustments to it if it becomes necessary.

   Week of         Reading                             Extras
  -------------   ----------------------------------  -----------------------------

   March 30       Practical C++, Chapters 1 to 7
   
   April 6        Practical C++, Chapters 8 to 11
   
   April 13       Computer Ethics, Chapter 1           Extra material on recursion.
   
   April 20       Practical C++, Chapters 12 and 13    Test on Wednesday, April 22
   
   April 27       Practical C++, Chapters 14 and 15
                  Computer Ethics, Chapter 5
                  
   May 4          Practical C++, Chapter 20
                  Computer Ethics, Chapter 6
   
   May 11         Practical C++, Chapter 16 and 17     Test on Friday, May 15
 
   May 18         Practical C++, Chapters 18, 19, 21
                  Computer Ethics, Chapter 2
                  
   May 25         Practical C++, Chapters 22 and 23    Ethics paper due May 29
                  Computer Ethics, Chapter 3
                  
   June 1         Practical C++, Chapters 24 and 26

Reading Guide: Practical C++, Chapters 1 to 11

The reading assignments for the first two weeks of the course include the first eleven chapters of Practical C++ Programming. That's 182 pages, but it's not as bad as it sounds since you've already encountered much of this material in Java. Also, there are a few sections that you don't need to worry about at all. Here is a short reading guide that will help you concentrate on the important stuff:


First Assignment

Here are the programming exercises for the first week of the course. The assignment consists of three exercises from the text. This is an individual assignment, and you should do all the work on it on your own. Turn in a printout of each program as well as the written "specification and code design" required for exercise 7-1. The program source code and compiled programs should be in your account on eck.hws.edu. (I might look for them there; make sure that I can find them by including the file names on your printout.)

The programs are due on Wednesday, April 8.


David Eck, 24 March 1998