From sbloch@adl15.adelphi.edu Mon Jan 25 15:33:57 1999
Received: from adl15.adelphi.edu by icculus.adelphi.edu (8.8.8/1.1.19.2/19Nov98-1041AM)
	id PAA14549; Mon, 25 Jan 1999 15:33:57 -0500 (EST)
Received: by adl15.adelphi.edu; id OAA02702; Mon, 25 Jan 1999 14:37:10 -0500 (EST)
From: Stephen Bloch <sbloch@adl15.adelphi.edu>
Message-Id: <199901251937.OAA02702@adl15.adelphi.edu>
Subject: no subject (file transmission)
To: sbloch@icculus.adelphi.edu
Date: Mon, 25 Jan 1999 14:37:10 -0500 (EST)
X-Mailer: ELM [version 2.4ME+ PL20 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Status: RO

\documentclass[12pt]{article}
\usepackage{fullpage}

\begin{document}

\title{Computer Science 172 \\
Introduction to Algorithms and Data Structures}

\author{Dr. Stephen Bloch \\
office 112 Alumn\ae\ Hall \\
phone 877-4483 \\
email \texttt{sbloch@adelphi.edu} \\
Web page \texttt{http://www.adelphi.edu/sbloch/} \\
Class Web page \texttt{http://www.adelphi.edu/sbloch/class/171/} \\
office hours TBA}

\maketitle

\section{Who Should Take This Course}
This is a second course in computer programming, and we'll use the Java
language for most of the semester.
If you have not taken CSC 171 ``Introduction to Computer Programming''
and don't have other programming experience, don't take this course.
If you \emph{have} taken CSC 171 or another beginning programming course,
but not in Java, talk to me:
you'll have a challenge learning the Java language and
object-oriented programming at the same time as everything else we talk
about, but you may be able to do it.  I expect that most of the people
in this course will be those I saw in CSC 171 last semester.

\section{Subject Matter}
This course continues where CSC 171 ``Introduction to Computer
Programming'' left off.  We'll continue learning features of the Java
language, but more importantly we'll continue studying algorithms and
data structures for computational problem-solving.

\begin{description}
\item[algorithm]
A specification of how to accomplish a particular task.
Many books use the example of a recipe in a cookbook, which specifies
how to convert raw materials (eggs, flour, etc.) into a desired end
product (a batch of cookies); other examples would be the procedure
you go through to start your car, or to multiply two large numbers
together, or the quadratic formula.  Most books also define an algorithm
as a \emph{sequence} of operations, but the notion of sequence is not
essential: the quadratic formula, for example, doesn't look like a
sequence of operations at first glance, and in fact it can be evaluated
in several different orders with no impact whatsoever on the result.

An algorithm is not quite the same thing as a program, although every
program has one or more algorithms at its heart.
An algorithm is more or less independent of the \emph{language} in
which it is expressed: one can write essentially the same algorithm in
Java, Pascal, C++, Visual Basic, and Scheme, although they will all look
cosmetically different (with different sequences of semicolons, commas,
braces, keywords, etc).

\item[data structure]
A specification of how to represent a particular kind of information
in a computer.  Most languages provide several ``primitive'' data
types, e.g. integers, characters, and perhaps strings, functions, etc.
But if the information you need to manipulate isn't exactly one of those
kinds of information, you need to figure out how to represent it.  For
example, last semester we defined a class \texttt{CartesianPoint} to
represent an \emph{ordered pair} of integers, wrapped up together as a
single object; and we defined a class \texttt{Shish} to represent an
\emph{ordered list} of kebabs of various sorts (lamb, tomato, etc.)
\end{description}

Data structures and algorithms are usually mentioned in the same breath,
because if you come up with a wonderful data structure to hold
information, you still need to supply algorithms for accessing and
manipulating the information.  Furthermore, as we saw last semester,
frequently the ``shape'' of a method corresponds to the ``shape'' of the
data on which it operates, so it makes sense to design a data structure
and algorithms for it simultaneously.

\section{Texts}
We'll use the same two textbooks as we did last semester:
\emph{Introduction to Programming Using Java: an Object-Oriented Approach},
by David Arnow and Gerald Weiss, published by Addison-Wesley, ISBN
0-201-31184-4, and
\emph{A Little Java, A Few Patterns} by Matthias
Felleisen and Daniel P. Friedman, MIT Press, ISBN 0-262-56115-8.

You'll need to read an average of about 40 pages a week.
\textbf{You are responsible for everything
in the reading assignments, whether or not I discuss it in a lecture.}
You are also responsible for checking my class Web page at least once a
week or so; I often post assignments, corrections to assignments,
solutions to assignments, \emph{etc.} there.

As an experiment in Web-assisted teaching, this course is being put on
the TopClass system, which allows an instructor to post not only
readings, homework assignments, announcements, etc. but quizzes:
students can take quizzes on the Web whenever it's convenient for them,
see immediately how they did, and get back suggestions on what to study
to fill in the areas in which they did poorly.  TopClass also makes it
extremely easy to email the instructor (which should reduce problems
with turning in homework by email) or other class members, and to
hold BBS-style or chat-room-style discussions of class subjects.
I have no idea how this
will work, as I've never used TopClass before, but it has the potential
to make life easier for student and instructor alike.  
Point your Web browser to \texttt{http://topclass.adelphi.edu} and
let's find out.

\section{Grading}
I expect to give nine or ten programming assignments --- roughly one
a week, due the following week.
Most assignments are to be turned in by email, and will be considered late
if the time stamp on the email is after midnight on the assigned due
date.  Assignments turned in up to a day late lose 30\% credit; those up
to two days late lose 60\% credit; and beyond that, they'll lose 90\%
credit (\emph{i.e.} the best grade you can hope for is 10\%.)

% These numeric grades will be converted to letter grades as follows:
% I'll draw a curve showing the distribution of numeric grades, and look
% for naturally-occurring ``clumps''.  For each clump, especially the
% top and bottom ones, I'll examine some exam and
% homework papers to decide what letter grade seems appropriate.  This
% method corrects for excessively hard or excessively easy assignments
% while not penalizing anybody for having genius classmates.

We'll also have a two-hour final exam on May 11, weighted the same
as a programming assignment: that is, if there are 9 programming assignments,
then each of them will be worth $10\%$ of your semester grade,
and the final exam will also be worth $10\%$.
The final exam must be taken at the scheduled time, unless arranged in advance
or prevented by a documented medical or family emergency.  If you have
three or more exams scheduled on the same date, or
a religious holiday that conflicts with an exam or assignment due date,
please notify me in writing within the first two
weeks of the semester in order to receive due consideration.
% (and I'd
% prefer it if you let me know earlier --- you should know within the
% first week of class when all your exams are).
Exams not taken without one of
the above excuses will be recorded with a grade of 0.

% Programs are not abstract works of art,
% they are supposed to run and solve real problems.  So if I get a program
% that doesn't compile or run, or a program that has little or nothing to do
% with the problem I assigned, I will give it a zero, no matter how much
% time you put into it.  Don't bother turning in a program you haven't
% tested yourself.
 
\section{Ethics}
Most homework assignments in this course involve writing, testing, and
debugging a program.  Although I may give one or two assignments to
be done (and turned in) by teams of two, most assignments are to be done
individually.  If I see essentially identical programs turned in by three
different people (not hard to spot, when one professor is in charge of
all the students), I'll grade it once and divide the points among those
students, so the best grade any of them can hope for is a 33\%.

All work on the final exam must be entirely the work of the one
person whose name is at the top of the page.  If I have evidence that
one student copied from another on an exam, \emph{both} students will be
penalized; see above.

% \pagebreak

\section{Schedule}
As I write this, there's only one section of the class, meeting 
every Tuesday and Thursday from 10:50 AM to 12:05 PM in Business 33.
All dates in the following schedule are tentative, except those fixed
by the University; if some topic listed here as taking one lecture in
fact takes two lectures to cover adequately, or \emph{vice versa},
the schedule will shift.

In the column marked ``Reading'', the letters ``AW'' precede page
numbers in the Arnow
\& Weiss textbook, while the letters ``FF'' precede page numbers in
the Felleisen \& Friedman textbook.

% In no case will an assignment be due earlier than indicated in the
% following schedule, but some may be due later; this will be announced
% in class a reasonable time in advance.  I'll try to keep an updated
% version of this schedule available online.  

I expect you to have read the reading assignments (usually 15--20
pages per lecture)
\emph{before} the lecture that deals with that topic.  
This way I can
concentrate my time on answering questions and clarifying subtle or
difficult points in the textbook, rather than on reading the textbook
to you, which will bore both of us.  \textbf{Please read ahead!}

When I say ``read'' above, I
mean a fairly active process, involving not only the textbook but
pencil, scratch paper, and a notebook for writing down key points.
Finally, and perhaps most importantly, you'll need a computer for trying
out the new ideas you find in your reading.  Just as you cannot learn
about cooking or driving a car just by reading about it, you cannot
learn about programming just by reading about it.  So I emphasize:
\emph{every} time you read about a new programming idea, \emph{try it!}

% \pagebreak

\subsection{Schedule of Lectures}
% Classes start 25 Jan.
\begin{tabbing}
{\bf Date(s)} \=
{\bf Assignment} \=
{\bf Reading \hskip3em} \=
{\bf Subject} \kill
{\bf Date(s)} \>
{\bf Assignment} \>
{\bf \hskip1em Reading} \>
{\hskip3em \bf Lecture Subject} \\
%
26 Jan \> \> HW1 \> Administrivia, TopClass, refresher \\
28 Jan \> AW 265--286 \> \> Loops, Vectors, and Enumerations \\
2 Feb \> AW 286--305 \> \> Working with loops, vectors, and enumerations \\
4 Feb \> AW 315--332 \> HW1 due; HW2 \> How to Design a Loop \\
5 Feb \> \> \> Last day to add courses \\
9 Feb \> AW 332--349 \> \> Other Common Loop Patterns \\
11 Feb \> AW 349--363 \> \> Applications of Loops \\
16 Feb \> AW 379--397 \> HW2 due; HW3 \> Organizing Data \\
18 Feb \> AW 398--413 \> \> Efficiency and Searching \\
19 Feb \> \> \> Last day to drop courses \\
23 Feb \> AW 413--427 \> \> Sorting and Arrays \\
25 Feb \> AW 427--444 \> HW3 due \> Life: An application of arrays \\
2 Mar \> AW 461--477 \> HW4 \> Recursion again \\
4 Mar \> AW 477--499 \> \> Applications of recursion \\
9 Mar \> FF 43--54 \> HW4 due; HW5 \> Recursive methods operating on lists \\
11 Mar \> FF 57--66 \> \> Separating data and action \\
16 Mar \> FF 69--83 \> HW5 due; HW6 \> Applications of visitor classes \\
18 Mar \> FF 85--97 \> \> Generalizing visitors \\
23 Mar \> FF 99--114 \> \> Who said ``only God can make a tree''? \\
25 Mar \> FF 117--131 \> HW6 due; HW7 \> Applications of trees \\
30 Mar--1 Apr \> \> \> No classes: Spring Break \\
5 Apr \> \> \> Last day to withdraw from classes \\
6 Apr \> AW 84--87, 130--139 \> \> Applets, controls, and graphics \\
8 Apr \> AW 173--187 \> HW7 due; HW8 \> Fonts and organizing a window \\
13 Apr \> AW 226--243 \> \> Event-driven programming in Java \\
15 Apr \> AW 305--314 \> \> More kinds of graphical controls \\
20 Apr \> AW 363--377 \> HW8 due; HW9 \> Threads and parallelism in Java \\
22 Apr \> \> \> Another language: Scheme \\
27 Apr \> \> \> Defining functions in Scheme \\
29 Apr \> \> HW9 due; HW10 \> Compound data types in Scheme \\
4 May \> \> \> Lists and recursion in Scheme \\
6 May \> \> HW10 due \> Catch up and review for final exam \\
11 May \> \> \> 10:30 AM--12:30 PM, Final Exam \\
\end{tabbing}

\end{document}

HW1: version 1: TickBuggle that moves diagonally
     version 2: make it bounce off walls and corners
     version 3: animate two of them at once
     version 4: animate a Vector of them at once
     version 5: write several different kinds of WalkingBuggles
HW2: something involving a loop, more complex than just "doForEach"
HW3: something involving searching and sorting and indexing:
     bubble-sort, insertion sort, selection sort, merge sort?
HW4: Recursion: fractals on the screen
HW5: Recursive methods operating on lists: find, insert, delete, swap
     elements in list of names or numbers or something.  Bubble-sort,
     insertion sort, selection sort, merge sort.
HW6: Re-implement some of this stuff using visitor classes.
HW7a: Arithmetic evaluator.
HW7b: Binary search tree.
HW8: Text window with "print" and "println" methods.
HW9: An applet with controls and threads: traffic simulation?
HW10: Some basic exercises in Scheme.

