CS 21: Algorithmic Problem Solving
Swarthmore College, Spring 2006
Section 1: TR 9:55-11:10, 240 Sci. Center
Professor: Tia Newhall
Email:
Office: 249 Science Center
Office hours: W: 2:30-3:30, R: 4-5
|
Announcements
Final Exam, Thursday, May 4th, 7-10pm, SCI Cunniff Hall 199
Office hours week of May 1st: Mon 1:30-2:30, Wed 1:00-2:00 (in CS Lab)
Contents
Class Schedule Topics, Readings, Assignments, Due Dates
Course Description and Text
How to Succeed in CS21
Grading
About Homework
About the CS Lab
Academic Integrity
Clinics
On-line References links to Unix and Java help
This course will introduce the fundamental ideas in computer science while
developing skill in software development. Algorithms will be implemented
in the Java programming language. Object-oriented programming and
data structures will be introduced in order to construct correct,
understandable, and efficient algorithms. This course is appropriate
for students who want to learn programming. No previous experience
with computers is required.
Required Text
Java Software Solutions: Foundations of Program Design, 4th Edition
by John Lewis and William Loftus.
Addison-Wesley, 2005. (ISBN: 0-321-32203-7)
How to Succeed in CS21
-
Read the material before you come to class.
Don't worry about total comprehension, but at least get a feel for
what we will be covering that week. If you have some understanding of
the material coming into class, it will be easier for you to ask
questions during class, rather than later when help may not be
available. Additionally, we often do lab exercises during class. This
is an important part of the learning process, as these exercises give
you immediate experience with the material we are covering. If you
read the book before you come to class, you'll be able to complete
these exercises more easily.
-
Ask questions if you don't understand.
This means both during class and while doing your homework. This class
continually builds on previous material, so if you don't understand
something one week, it will continue to be a problem the next week,
and the week after that, and so on. If you need help, ask your classmates
(make sure you have read the "Homework Scenarios" section below first),
attend the clinics, come talk with me during my office hours, or
email me your question.
-
Start the homework assignments early.
I realize this one is not always easy to do, but if you can get in the
habit of doing this, you will be much better off. If you get
stuck early (i.e., not two hours before it is due), there will be time
to look for help. In addition, if you start early enough, you can
take a break, go do something else, and come back later. I find I
always have at least a few new ideas when I come back to a problem
after a break. If you wait until the last minute, you can't do this.
-
Practice, practice, practice.
The only effective way to
learn the material and pass the exams is to consistently do the
homework. Finish all of the assigned programs (and do some extras,
for fun!). Even if you don't get them done on time, they will still
help you learn the material.
-
Seek help early and often.
Because course material builds
on previous material, it is essential to your success in this class
that you keep up with the course material. If you are having difficulty
with a programming assignment, if you didn't follow something covered
in lecture, if you feel you need some extra help understanding or
practicing some of the course material, or if you just want to discuss
something from a lecture, an assignment, or the text, please come to
my office hours. Also, CS21 clinicians are available to help you
with programming assignments during
CS21 clinic hours each week.
25% Exam 1
25% Exam 2
40% Homework
05% Class Participation/Attendance
05% Quizzes
Homework
Homework will generally be assigned on Tuesdays, and will be due the following Monday by 11:30pm. Typically, each assignment will consist of several separate programs. Only one of these programs will be graded (you will not know which one in advance). If you do not submit the program that is selected for grading, you will receive a zero for the assignment. Some homework assignments may have optional problems that you can complete for extra credit points.
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 on
which assignments you are allowed to work with a partner.
Homework assignments will be given a numerical grade according to the criteria shown below. Note that a program that works 100% correctly gets a 3. In order to get an 4, your program also needs to be clearly organized and well-commented
(but this doesn't mean over-commented!). The numerical grades will be
scaled in some way so that the difference between a 4 and a 3 is more like
the difference between an A and a B grade.
4 correct, logically designed, well-documented, efficient
3 correct, but has stylistic problems
2 partially correct
1 mostly incorrect
If there are known problems with your code, you should describe these
problems in a comment at the top of your program file.
About the CS Lab
The CS Lab (room 240) and the overflow lab (room 238) are open 24 hours
a day for CS students to work on their course assignments. When the
CS Lab is in use by a class, you should work in the overflow lab.
We will distribute MicroProx tags sometime in the first week of classes.
These will allow you entry to the CS Lab and entry into the Science
Center after building hours. You should use the door between Martin and
Cornell to get into the building after midnight.
Please read through the "welcome message", "computer user agreement",
and "computer lab rules" under the "introduction" section of the
CS help pages.
Academic Integrity
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.
These are OK:
- Late Thursday night, after working for a few hours on this week's
CS21 homework, you realize you are stuck on one particular function.
Instead of working more, and possibly not making any progress, you
decide to get a good night's sleep and visit your instructor during
office hours the next day.
- After working on a program for a few hours, you realize you are
stuck with one particular concept. You look around the CS Lab,
find someone in the class, and ask them for help. After explaining
what you are trying to do, your classmate points out a flaw in
your idea, and gets you started in a new direction. After successfully
completing the program, you add a comment at the top of the code
stating who you received help from.
- You had trouble with the last homework assignment, so you ask
someone in class if they would like to work as a team on this
week's assignment. You get together well before the assignment
is due, and discuss the first program. After figuring out a
reasonable algorithm, you work together to type in the program
and debug it. When you are finished with the program, you put
both of your names in the comments at the top, and turn it
in as a team.
These are definitely NOT OK:
- No matter what you do, you can't seem to get your program to work and
are getting very frustrated. A friend of yours comes into the CS Lab
who you know has already finished this week's homework. You ask her
for help, but since she is busy working on an assignment in another
class, she offers to print out a copy of her code for you to look at.
- After working on a program for a few hours, you realize you are
not making any progress with one particular function. As no one
is around to ask for help, you take a look at your friend's
program in his home directory, to see how he wrote the function.
- Late Sunday night, after just starting this week's CS21 homework a few
hours ago, you realize you will never finish before the deadline.
After searching through many directories, you finally locate
another student's homework and copy it to your home directory.
After modifying a few comments, you turn in the copied program as your
own.
Schedule
The following schedule is tentative; it will be updated as we go along:
WEEK
| TOPIC
| READING & ANNOUNCEMENTS
| IN-CLASS
| HOMEWORK
|
1 (1/16)
| Java and Unix Intro
| skim: chapt 1, read: 1.4-1.6, 2.1-2.6
Using Unix I:
Tues, 4-5pm
repeat session: Wed, 8-9pm
| Tues
Thurs
|
HW 0
HW 1
|
2 (1/23)
| Conditionals and Loops
| 5.1-5.5, 5.8
Using Unix II:
Tues, 4-5pm
repeat session: Wed, 8-9pm
Friday: add/drop ends
| Tues
Thurs
|
HW 2
|
3 (1/30)
| Using Classes and Objects
| 3.1-3.8
Parts of a Program's Memory
String Class,
Random Class,
Math Class
| Tues
Thurs
|
HW 3
|
4 (2/6)
| Methods
| 4.1-4.4, 11.1-11.2
About Method Calls
| Tues
Thurs
| HW 4
|
5 (2/13)
| OO design, Arrays
| 6.1-6.9, skip 6.5, 7.1
| Tues
Thurs
|
HW 5
|
6 (2/20)
| Arrays, File I/O
| 7.1-7.2, 7.4
| Tues
|
HW 6
|
7 (2/27)
| 2D Arrays, Searching
| 7.6, 9.4, 9.5
Exam 1, Tuesday in class
Exam 1 Topics
| Thurs
| -
|
SPRING BREAK
|
|
|
|
|
8 (3/13)
| Searching, Sorting, big-O
| 9.5, 9.4
| Tues
Thurs
|
HW 7
|
9 (3/20)
| Arrays of objects, Interfaces
| 7.3, 6.5
Friday: last day to withdraw
| Tues & Thurs
| -
|
10 (3/27)
| Inheritance
| 8.1-8.5, 9.1-9.6
| Tues & Thurs
| HW 8
|
11 (4/3)
| Linked Lists
| 12.1-12.2
Linked Lists
Scanner Class,
| Tues & Thurs
|
HW 9
|
12 (4/10)
| Linked Lists and Recursion
| 12.1-12.2, 11
| Tues
Thurs
|
HW 10
|
13 (4/17)
| BSTs
| 12.4
Binary Search Trees
| Tues & Thurs
|
HW 11
|
14 (4/24)
| BSTs, Graphics
| 2.7-2.9
Additional Clinic Wed 7-10pm
| Tues
| -
|
Finals Week
| -
| Final Exam, Thursday May 4th, 7-10pm, SCI Cunniff Hall 199
Exam 2 Topics
Office hours week of May 1st: Mon 1:30-2:30
and Wed 1:00-2:00.
Wed's office hours will be a Q&A session held in the CS lab
CS Dept picnic: Wed May 3, 3pm
| -
| -
|
Clinics
During clinic hours, the clinician
is available to help with your weekly programming assignments.
Each week we will have CS21 clinics in the main CS Lab
at the following times:
|
Clinician: Meggie Ladlow
Location: SCI 240
Hours: Sat, 2-5pm
|
|
Clinician: Megan Schuster
Location: SCI 240
Hours: Mon, 6-9pm
|
|
Clinician: Scott Blaha
Location: SCI 240
Hours: Sun, 1-4pm
|
On-line References
- cs21handin: how to use the cs21handin program to turn in assignments.
- useful Unix commands: handout from the first day of class.
- CS Department's Unix Help Pages
- My Unix Documentation make, tar, cvs, rcs, debugging tools, editors, email,
protecting and sharing files, Java style guide, ...
- Safe File Sharing for Group Projects
- Java Code Style Guide
- Compiling, Debugging Tips for Java
- The Java Tutorial (start with Getting Started (Unix version))
- Java API Documentation
((local copy)Java Collections Documentation
- All Java Documentation