Here's a PostScript version and a PDF version of this page. They're much more nicely typeset than the rubbish you'll get if you use your browser to print this page.
CS 4: Introduction to Computing for Engineers (Spring 2006)
Course Overview

Prof. Jonathan Shewchuk
Office: 625 Soda Hall
Phone: 642-3936
Email: jrs@cory.eecs

Course Secretaries:
Cindy Palwick and Audrey Raya
Office: 385 Soda Hall
Phone: 642-7699
Email: 385-soda@cs

Teaching Assistant:
Clint Ryan, ryanc@cs

Lectures are Mondays and Wednesdays, from 5:30 pm to 6:30 pm in 320 Soda Hall. Labs are Mondays from 6:30 pm to 8:30 pm, and Thursdays from 5:00 pm to 8:00 pm. There is a class Web page at


CS 4 (currently called ``CS 39L'' in TeleBears) is an introductory computer programming course for students with no (or little) programming experience. It is an alternative to CS 3 or E 77 that employs programming examples from engineering and science (as opposed to the symbolic computing emphasis of CS 3). The main programming language of CS 4 is Java (as opposed to Scheme in CS 3 or Matlab in E 77), which is used heavily in industry.

CS 39L may be used (by petition) as a replacement for E 77 for students in Mechanical Engineering, IEOR, and some areas of Bioengineering. Of course, it may be used as a replacement for CS 3 for EECS students.

Please read this document carefully. It contains answers to most of the questions that students ask during the first few weeks of class. The subjects include: how to contact the staff, prerequisites, the textbook, labs, grading, late penalties, and policies on academic misconduct.

Please check the class Web page at the beginning of the semester and regularly throughout to learn about new information and syllabus changes. Your reading assignments will be listed on the class Web page. Please keep up with them. There will not be reminders in class.

If you have a general question about something not covered herein, the best option is to post a message in the ucb.class.cs4 newsgroup (which is required reading). You can access newsgroups from Thunderbird, Outlook, and some Web browsers. From Unix, you can access newsgroups from a news reader like trn or rn. To access the newsgroup from off campus, you will need to go through the portal using your class account. We (the instructor and TA) check the newsgroup regularly, and other students will be able to help you too. Other students will also be able to benefit from the answers.

If you don't want to make your question public, or if your question would expose part of the answer to a homework assignment, you may send email to cs4@cory.eecs. Your email will be forwarded to both the instructor and the TA. You are always welcome to come to our office hours, which will be listed on the class Web page. If the office hours are not convenient, you may make an appointment with either of us by email. Please reserve email for the questions you can't get answered in office hours, in lab, or through the class newsgroup.


The only prerequisite for CS 4 is a solid grasp of high school physics and math, especially algebra and trigonometry. However, Math 1A (Calculus) is a corequisite--you may take it either before or at the same time as CS 4.

Previous programming experience is not required for this course. We will be learning basic programming and the Java programming language. You may have heard that Java is a language for programming Web applications and developing animated home pages. This is partly true, but neither of these will be covered in this course. We will simply use Java as a better language for writing modular programs than many of the alternatives.

If you have already taken an introductory programming course in high school or college, or ``placed out'' by scoring well in the Advanced Placement Computer Science exam, then you probably do not need to take CS 4 (or the alternatives, CS 3 or E 77). Check with your academic advisors.

Textbook and Readings

There is one required textbook for the course. Chapman gives an introduction to programming in Java. This text should be available at the ASUC bookstore, or perhaps across Bancroft at either Ned's or the Campus Textbook Exchange. The first edition is not recommended.

Electronic copies of all class handouts will also appear on the Web page. There may be up to four types of files. Raw ASCII text (README files and other filenames without an extension) can be printed from Unix using the enscript command. (I don't have a clue how to print them from Microsoft Windows--Word, maybe?) PDF files (filenames ending in .pdf) can be viewed and printed from either Windows or Unix computers, using Acrobat Reader (acroread on a Unix system). PostScript files (filenames ending in .ps) can be viewed using Ghostview (gv), and can be printed from a Unix system using the lpr command. Do not use enscript on a .pdf or .ps file! You'll just print reams of garbage. HTML files (filenames ending in .html) can be viewed and printed from Firefox, Mozilla, Netscape, or Microsoft Explorer.

Clint and I will post announcements, clarifications, hints, and other information in the ucb.class.cs4 newsgroup, which you should read regularly whether you post questions to it or not, so that you're not the last to find out about major changes to assignments and due dates.


In addition to the lectures, you will attend two labs each week, on Mondays from 6:30-8:30 pm and Thursdays from 5:00-8:00 pm. All labs meet in 277 Soda. Laboratory attendance is mandatory. Each week you will solve an assignment in the lab, and have points checked off by your TA or lab assistant. Account forms will be given out at the beginning of the first lab. If you miss the first lab, see Clint as soon as possible.

The Soda labs are open from 7:00 am to 6:30 pm Monday through Friday. Outside these hours (and on weekends and holidays), the doors to the building and labs are locked. You will need to obtain a card key at the CS main office for after-hours access.


This semester, CS 4 is listed as ``CS 39L'' in TeleBears, and is limited to 26 students. To see if there's space left in CS 39L, see the online schedule of classes.

Course Work and Grading

There are a total of 400 points you can earn toward your final grade in the course. There will be one midterm exam, worth 100 points, and a final exam worth 140 points. The test coverage is cumulative, so material from the beginning of the course may be tested in both the midterm and the final exam. All exams will be graded by the TA and professor.

In addition to exams, there are three types of assignments: homeworks, labs, and one final project. Homeworks (roughly one per week) are short programs. Homeworks must be done individually. They are typically due before lecture on Mondays, and will be graded by the class reader. Homeworks are worth a total of 80 points out of the 400, and each homework is equally weighted. Your worst homework grade will be dropped. For example, if there are 11 homeworks during the semester, each of the 10 best is worth 8 points of your final grade.

Labs are short assignments that must be done during the scheduled lab period. Labs are done in teams of two. You will be assigned a random lab partner, different each week, at the beginning of each lab. Grading of labs is done by having certain steps checked off by your TA or a lab assistant. Labs are worth 40 points of your final grade, and each lab is equally weighted. Since I expect some of you to have conflicts during the semester, we will drop your lowest two lab grades.

The remaining 40 points of your final grade will come from a large programming project late in the semester. You will do the project with a partner. The project is substantial, and cannot be put off until the last moment. If you start working on the project a few days before its due date, you will not be finished by the deadline.

Your final letter grade will be determined by the following chart.

Points Grade
380-400 A+
360-379.99 A
340-359.99 A-
310-339.99 B+
290-309.99 B
260-289.99 B-
240-259.99 C+
220-239.99 C
200-219.99 C-
170-199.99 D
0-169.99 F

In other words, there is no curve; your grade will depend only on how you do, and not on how well everyone else does. CS 4 is not a competition.

Our experience is that grades on homeworks and projects are higher than on exams, so you should assume this will be the case for your own grades and not be surprised if your exam grades are lower than your final grade, while your homeworks and projects are higher.

If you believe we have misgraded a midterm exam question or project, return it to me with a written note on a separate piece of paper explaining the problem. Staple this paper to the front of the exam. (Not the back! I mean it!) The entire exam or project may be regraded, so be sure to check the solutions to confirm that your final grade will go up after regrading. All requests for regrades must be made within two weeks after you receive the graded assignment or exam. By University policy, final exams may not be regraded.

A course grade of Incomplete will be granted only for dire medical or personal emergencies that cause you to miss the final, and only if your work up to that point has been satisfactory.


We will give no credit for written homework or labs turned in after the deadline. Please do not ask for extensions for homework or labs--each of these assignments is worth very few points. Late homework and labs will not be accepted for any reason whatsoever, even emergencies. We drop your lowest homework grade and your lowest two lab grades to give you leeway to handle personal crises; we don't feel obliged to offer more than that.

We do allow the project to be turned in late, but there is a penalty. If your project is N hours late, we'll reduce your earned score by ceiling(N/2) percent. While this gives you some leeway for putting the final touches on a project, do not stretch the deadlines too far. A project that is one day late will lose 12% of your earned score. After five days, even a perfect solution won't earn a passing grade.


The midterm is scheduled to be held in lab on Thursday, March 16 (5:00-8:00 pm, 277 Soda). The time and room for the final exam will be announced later in the semester.

Policy on Collaboration and Cheating

Cheating on a homework, lab, or project will earn you the maximum negative grade on that assignment. For example, if you cheat on a project worth 20 points, your grade on that project will be -20. Cheating on an exam, or cheating twice in any way, will earn you an F in the course. I reserve the right to assign an F in the course to anyone who cheats on the project, though I rarely exercise this right. All incidents of cheating will be reported to the Office of Student Conduct, who will maintain records of your academic misconduct throughout your undergraduate career.

We encourage you to help each other learn the material by discussing the work before you do each assignment. Explaining the meaning of a question or offering advice on what a compiler error message means are interactions that we encourage. On the other hand, you should never have another student's solution or code in your possession, either electronically or on paper. (We will call this the No Code Rule.) If you are not sure whether a particular interaction is appropriate, talk to your TA or the instructor.

If you receive a significant idea from someone in the class, explicitly acknowledge that person in your solution. Not only is this a good scholarly conduct, it also protects you from accusations of theft of your colleagues' ideas.

Presenting another person's work as your own constitutes cheating, whether that person is a friend, an unknown student in this or another class, or an anonymous programmer on the Web who happens to have solved the problem you've been asked to solve. Everything you turn in must be your own doing, and it is your responsibility to make it clear to the graders that it really is your own work. The following activities are specifically forbidden in all graded course work:

You will do the labs and the project with a partner. Any assignment that is not designated as a partnership assignment must be done individually. On partnership assignments, you share everything with your partner, but the rules for individuals given above apply between partnerships. You may not work with another pair or share solutions between teams. Each individual in a partnership is responsible for the entire project, which means that you will be held responsible if your partner uses another team's solution to produce part of your team's solution. Once you've begun coding a project, you may not exchange partners without our permission. If you and your partner have irreconcilable conflicts after beginning a project, you must speak to me before breaking up or reforming your team. Only one of the new partnerships (at most) will be allowed to keep the code developed thus far.

Cheating will be policed by advanced cheating-detection software. If you share code with another partnership, you will be caught, even if you take steps to hide your cheating.

In my experience, nobody begins the semester with the intention of cheating. Students who cheat do so because they fall behind gradually and then panic. Some students get into this situation because they are afraid of an unpleasant conversation with a professor if they admit to not understanding something. I would much rather deal with your misunderstanding early than deal with its consequences later. Even if you are convinced that you are the only person in the class that doesn't understand the material, and that it is entirely your fault for having fallen behind, please overcome your feeling of guilt and ask for help as soon as you need it. Remember that the other students in the class are working under similar constraints--they are taking multiple classes and are often holding down outside employment.

Mail inquiries to cs4@cory.eecs