Professor: Lisa Meeden
Section 1: Tuesdays and Thursdays 8:30-9:45am, Sproul 201 Section 2: Tuesdays and Thursdays 2:40-3:55pm, Sproul 201 Email: meeden AT cs.swarthmore.edu Office: Sproul 1 Phone: 328-8565 Office hours: Wednesdays 1:30-4pm, or by appointment |
This course introduces students to fundamental ideas in computer science using the C programming language and the Unix operating system environment. Class periods will consist of a combination of lectures and hands-on interaction at the computer. Topics to be covered include an overview of the Unix operating system, elementary Unix tools, modular software design, recursion and iteration, sorting and searching, abstract data types and their representations, lists, trees, informal analysis of algorithms, and a thorough introduction to C programming, including control structures, functions and procedural abstraction, libraries and modules, arrays, pointers, string manipulation, file processing, and records.
We will be paying particular attention to developing a good programming style. Your homework grade will be strongly influenced by the legibility of your code, so it is very important to develop a clear, logical, aesthetically pleasing programming style, making judicious use (but not overuse) of comments, whitespace, well-chosen variable names, and a consistent indentation style. There will be numerous programming assignments illustrating the concepts covered in class.
The required textbook for the course is The Art and Science of C: An Introduction to Computer Science, by Eric S. Roberts
Your homework assignments will be turned in electronically, using a special cs21handin program (to be explained in class). Late homework is not accepted. However, if you miss a deadline, you are strongly encouraged to complete the assignment anyway, since this really is the only effective way to learn the material.
Because many students feel they learn more through collaboration, you may work jointly with one other person on some designated assignments (although you may work alone if you wish). No more than two people should work together. If you work with someone else, you must submit a single, joint assignment with both names clearly indicated at the top of your program file(s). I will let you know which assignments you are allowed to collaborate on.
Homework assignments will be given letter grades according to the criteria shown below. Note that a program that works 100% correctly gets a B. In order to get an A, your program also needs to be clearly organized and well-documented (but this doesn't mean over-documented!).
A correct, logically designed, well-documented, efficient
B correct, but has stylistic problems
C partially correct
D does not compile or execute
If there are known problems with your code, you should describe these problems in a comment at the top of your program file.
The College's Judiciary Committee (CJC) handles plagiarism offenses. The penalties for plagiarism are quite severe: usually the first offense leads to failure in the course, but it may additionally result in suspension. The following constitutes plagiarism on CS programming assignments:
Under no circumstances may you hand in work done with (or by) someone else under your own name. Your code should never be shared with anyone; you may not examine or use code belonging to someone else, nor may you let anyone else look at or make a copy of your code. This includes sharing solutions after the due date of the assignment. Failure to abide by these rules constitutes academic dishonesty and will lead to a hearing of the College Judiciary Committee.
The exception is that you may use code that the instructors have distributed in class and code from the book (you should cite this code as coming from the instructor or from the book). Also, if you work with a partner, then you and your partner may share code for the particular assignment on which you work jointly (again, both your names must appear in the comment at the top of the file). Additionally, CS21 clinicians are allowed to help you with your code.
Discussing ideas and approaches to problems with others on a general level is fine (in fact, we encourage you to discuss general strategies with each other), but you should never read anyone else's code or let anyone else read your code. If you are in doubt about some help that you received, then credit the person(s) from whom you got help and discuss the situation with your instructor.
For some examples of what we consider "okay" and "not okay" collaboration, look at the scenarios below.
At these clinics there will be a student, who has previously taken this course, available to help you find answers to your programming questions.
WEEK | DATES | TOPIC | READING | ANNOUNCEMENTS | IN-CLASS | HOMEWORK |
1 | 9/2, 9/4 | Introduction to C Programming | 1, 2 | Using Unix I, Tues. 4pm or Wed. 9pm | week1 | hw1, hw2 |
2 | 9/9, 9/11 | Problem Solving | 3, 4 | Using Unix II, Tues. 4pm or Wed. 9pm | week2 printf switch if | hw3 |
3 | 9/16, 9/18 | Functions and Debugging | 5 | Using Unix Session III, Tues. 4pm or Wed. 9pm | week3 using stubs | hw4 |
4 | 9/23, 9/25 | Libraries and Graphics | 7 | - | week4 interactive graphics | hw5 |
5 | 9/30, 10/2 | Libraries and Random Numbers | 8 | EXAM 1 (covers chapters 1-5, 7), in class Tuesday 9/30 | week5 | hw6 |
6 | 10/7, 10/9 | Arrays | 11 | - | - | hw7 |
- | 10/13-10/17 | - | - | Fall Break | - | - |
7 | 10/21, 10/23 | Searching, Sorting, and Analysis of Algorithms | 12, 17.3 | - | week7 | hw8 |
8 | 10/28, 10/30 | Pointers | 13 | - | - | hw9 |
9 | 11/4, 11/6 | Review for the exam | none | Review Session, 9pm in the sun lab Tuesday
11/4, food and games EXAM 2 (focuses on chapters 8, 11-13, 17.3), in class Thursday 11/6 | - | - |
10 | 11/11, 11/13 | Characters and Strings | 9.2, 14 | - | - | hw10 |
11 | 11/18, 11/20 | Reading and writing files, using make files | 15, handouts | - | - | hw11 |
12 | 11/25 | Records | 16 | Thanksgiving break | week12 | - |
13 | 12/2, 12/4 | Linked Lists | handouts | - | week13 | hw12 |
14 | 12/9 | Linked Lists continued | - | - | - | - |
Finals | 12/12-12/20 | - | - | EXAM 3 (cumulative), December 17, 7-10pm Kohlberg 115 | - | - |
Selected answers to the end of chapter review questions.