CS 70, Fall 2001
Data Structures and Program Development

Quick index:

  • Cheating and honor-code issues. You are responsible for knowing this information and following these rules!
  • Useful general information
  • Finding tutors and professors
  • Course content
  • Reading assignments
  • Homework assignments and FAQs
  • Course handouts
  • Exam results
  • Administrative matters
  • Class suggestion box
  • Useful Information

    The tutors and graders assigned to this course are:

    Please do not leave voice-mail messages regarding CS70 questions. If you cannot reach someone, send mail to cs70help instead.

    You can always get help from the graders and the professor by sending mail to cs70help@cs.hmc.edu. This is a good way to report problems or to get quick help on a homework question. DO NOT send mail to cs70grad to get help. Mail to this account will never be answered promptly, and usually will not be answered at all. DO NOT SEND MAIL DIRECTLY TO YOUR PROFESSOR. YOU SHOULD ONLY SEND MAIL TO THE PROFESSOR IF YOU HAVE AN ISSUE THAT YOU WANT TO HIDE FROM THE GRADERS, SUCH AS REPORTING AN HONOR-CODE VIOLATION.

    Finding Geoff

    My weekly schedule is posted on the Web for all to see. I am generally in my office every day except Friday. If the door is open, please feel free to drop in with your questions. Even if I happen to be busy, I'll at least know that you need to talk to me and we can set up an appointment to talk. If you are on a computer, the command finger @mallet will generally tell you whether I'm logged in and have multiple active windows, which is a very good sign that I'm in the office.

    As a general rule, the talk utility is not a good way to reach me, regardless of what machine you are trying to reach me at. I usually keep my command windows closed and my bell disabled, so I will never see the talk request.

    I will normally try to be in my office in the evening on Wednesdays when an assignment is due. You can e-mail me, call me (x71610), or stop by with your questions.

    On Fridays I do research. You can sometimes reach me by calling 310-825-7307, though you'll rarely get an answer between 1 and 3 PM, when I'm in meetings. In general, if I'm available to answer the phone, I'm also available to answer questions. If you can't get me by phone, send e-mail.

    Finding Prof. O'Neill

    TBA.


    Catalog Description

    Note: the following catalog description is outdated. It will be replaced with the current description when possible. Abstract data types including priority queues, dynamic dictionaries, and disjoint sets. Efficient data structures for these data types, including heaps, self-balancing trees, and hash tables. Analysis of data structures including worst-case, average-case, and amortized analysis. Storage reclamation and secondary storage considerations. Extensive practice in implementing these data structures in several languages for a variety of applications.

    What's really covered: as with most courses, the catalog description isn't 100% accurate. A better description of what we cover is:

    Major features of the C++ language, including pointers, classes, templates, and operator overloading. Programming style. Extensive practice in professional-quality programming. Abstract data types and data structures, including arrays, lists, stacks, queues, dequeue, dynamic dictionaries. Efficient data structures for these data types, including arrays, lists, trees, self-balancing trees, hash tables, and B-trees. Memory management. Practical aspects of using data structures in programs. Analysis of data structures, including worst-case, average-case, and amortized analysis.

    Prerequisites: Computer Science 60.
    3 credit hours.

    Goals

    In this course, you should learn

    You will also get lots of practice writing software, including some fairly large programs, so as to improve your coding skills and speed.


    Homework Assignments

    There will be 11 homework assignments. Most will take 1 week, but you will be given 2 weeks to complete a few of them, due either to difficulty or to other factors such as school breaks. Assignments will be posted here and announced on the class mailing list. Assignments will normally be due on Wednesday evenings at 9 P.M. See the homework policies and homework grading guidelines pages for general information on homework. There is also a page of frequently asked questions about homework that is worth checking from time to time.

    Homework assignment #1, cleaning up stylistically bad code, and its grading curve.

    Homework assignment #2, a program to find stylistically bad constructs, and its grading curve.

    Homework assignment #3 (which also includes assignment #4), a registrar database for Deep Glen Polytechnic, and the grading curves for homework 3 and homework 4.

    Homework assignment #5, complexity analysis, and its grading curve.

    Homework assignment #6, interactive debuggers, and its grading curve.

    Homework assignment #7, a genetic algorithm, and its grading curve.

    Homework assignment #8, a bar simulation, and its grading curve.

    Homework assignment #9, an encryption program using chunky strings, and its grading curve.

    Homework assignment #10, a hash-based spell checker, and its grading curve.

    Homework assignment #11, binary trees and binary I/O, and its grading curve.


    Handouts

    The following handouts were provided to students in class. For those who missed the lecture, or who wish to make use of code from the handouts, they are also available for downloading here. Note that C++ source files are exactly the same as were presented in class, which means that any bugs discovered during the lecture are still present.

    Postscript files may be printed from Turing by simply typing "lpr foo.ps". They may be directly viewed with the utility gv (if your shell claims it's not found, try /usr/openwin/bin/gv).

  • From September 4, 2001: quick facts for the first day of class (Postscript).
  • From September 6, 2001: examples of good and bad style (Postscript).
  • From September 18, 2001: the recipe for Prof. Kuenning's killer chocolate-chip cookies.
  • From October 7, 2001: a simple insertion sort algorithm.
  • From October 9, 2001: a table of interesting complexity relationships.
  • From October 11, 2000: The broken matrix multiplication program (with commentary added), a really broken version of the same program, and a version with all the bugs fixed.
  • From October 16, 2001: a simple Makefile.

  • Exam Results

    The midterm has been graded and the curve is available.

    The final has been graded and the curve is available.


    Helpful C++ Information and Code Examples

    The course has inherited a number of pages that contain notes on all sorts of useful topics from ex-HMC Prof. Margaret Fleck.

    Reading Assignments

    Reading assignments are selected from all three texts. In the following table, all week numbers and dates apply to Section 1, which meets Tuesdays and Thursdays. Students in Section 3 should complete reading assignments on the Monday or Wednesday preceding the due date for Section 1.

    Week Due Date Assignment Total Pages Subject Lecture Topic(s)
    1 September 4 No reading assignment Class introduction
    Overview of style
    September 6 Kernighan & Pike, Chapter 1.
    Stroustrup, 1.1, 1.2, 1.7, 1.8; Chapter 2; 6.4.
    28
    33
    Style
    A tour of C++; Style
    Programming style
    2 September 11 Stroustrup, Chapter 4. 18 Types and declarations
    September 13 Weiss 1-1.3, D.1, D.3.
    Stroustrup 5.1, 5.4.
    32
    6
    Pointers and arrays
    Pointers; constants
    History of C++
    Introduction to pointers
    3 September 18 Weiss 2.1-2.2.
    Stroustrup 5.2-5.3, 5.5-5.6, 10.1-10.3.
    16
    29
    Classes and objects
    Arrays, pointers, references, classes
    Variable and pointer lifetimes
    September 20 No reading assignment Arrays and pointers
    4 September 25 Weiss 1.4, D.2, 2.3-2.7.
    Stroustrup 6.2.6-6.3.3.1, 6.4, 10.4-10.5.
    37
    12
    New/delete; more on classes
    Free store, constructors, objects
    New and delete
    September 27 Kernighan & Pike, Chapters 5-6. 48 Debugging
    Testing
    Debugging
    5 October 2 Weiss, Chapter 6. 30 Complexity Complexity Analysis
    October 4 No reading assignment
    6 October 9 Weiss, Chapter 4. 30 Inheritance Make
    October 11 Stroustrup, Chapter 12. 26 Object-oriented programming using C++
    7 October 16 Stroustrup, Chapter 11. 40 Operator overloading Operator overloading
    October 18 Weiss, Chapter 5. 31 Design patterns Iterators
    8 October 23 Fall break
    October 25 Weiss, Chapter 3.
    Stroustrup, Chapter 13.
    19
    28
    Templates Templates
    9 October 30 No reading assignment Midterm post-mortem
    November 1 Weiss, Chapter 16. 24 Stacks and queues Lists, stacks, queues, and deques
    10 November 6 Weiss, Chapter 20. 24 Hash tables Hash tables
    November 8 No reading assignment
    11 November 13 Weiss, Chapter 18. 32 Trees Trees and tree representation
    November 15 No reading assignment Tree traversal
    12 November 20 Weiss, Sections 19.1-19.3. 20 Binary search trees Binary search trees
    November 22 Thanksgiving
    13 November 27 Weiss, Sections 19.4-19.6. 32 Balanced binary trees AVL trees
    November 29 Weiss, 19.7-19.8. 24 B-trees B-trees
    14 December 4 Weiss, Chapter 7. 28 STL STL
    December 6 Reserved for slippage (material TBA)
    15 December 11 Reserved for slippage (material TBA)
    December 13


    Administrative Matters

    See the administrivia page for details of administrative matters:

    You are responsible for being familiar with the contents of the administrivia page!

    Class Suggestion Box

    If you have questions that you prefer not to ask during class, or suggestions that you would rather have remain anonymous, there is now a class suggestion box on the Web. This interface will allow you to send e-mail to Prof. Kuenning such that it appears to have also come from him, instead of from yourself.


    © 2001, Geoff Kuenning

    This page is maintained by Geoff Kuenning.