[ news | information | lectures and labs | problem sets | links ]

CS51 - Fall 2004
TR 2:45-4, W 7-8:15 in Andrew 257
Prof. Chen

5/17/2005: I've archived all of the notes and problem sets (ie, most of the links below don't work) and am only leaving up the syllabus for reference. If you're looking for the material, you may be able to find a link to a more recent offering of the class here or here.

News

Please check here regularly for assorted announcements. You are responsible for being aware of information posted here.
  • 04-10-26: The second midterm will be in class on Thursday 11/11. You are allowed 2 double-sided 8.5"x11" pages of notes, which must be in your own writing.
  • 04-09-30: The first midterm is next Tuesday (10/5), in class. You are allowed 1 double-sided 8.5"x11" page of notes, which must be in your own writing.
  • 04-09-23: There's a CS barbeque at 4PM tomorrow (Friday, 9/24). I won't be there, but most of the other professors and many of the majors should be.
  • 04-09-23: I've put the complete source code for Pong in the class folder.
  • 04-09-10: Note that for the CountChange problem in ps2, the code on pages 115-116 of the textbook cannot be used verbatim because you have not defined the Purse class. However, you should not therefore define a Purse class, rather your solution should compute the amount of change directly in the main method.
  • 04-09-08: If you have a laptop with java and emacs installed on it, and would prefer to work on it instead of on the machines in Andrew 257 during lab, feel free to bring it to lab tonight.
  • 04-09-06: I am cancelling my office hour tomorrow (Tuesday, 4-5) because of a committee meeting.
  • 04-09-02: The official TAs/graders for the class are Jeff Jablonski and Evan Yazawa.
  • 04-09-01: There is lab tonight, although if you are a first-year student and want to go to the mug-passing ceremony, you can arrange with me to make up the lab sometime in the next day or so. (Sometime today would be best; I will be around tonight until at least 9:30PM.)
  • 04-08-31: If you're planning on installing java on your laptop, it might be useful if you brought it to lab on Wednesday, September 1.
  • Information

    CS51 is an introduction to computer programming (in Java) and computer science (with some coverage of both data structures and algorithms). The course has been designed for students already interested in math and/or science and who are perhaps considering a major or minor in computer science. The first part of the course focuses on object-oriented programming in Java (control structures, recursion, arrays, designing classes, applets, event-driven programming). The last few weeks focus more on learning about basic data structures (linked lists, stacks, queues, etc) and algorithms (sorting, searching). No programming experience is required (or assumed). However, Math 30 is a prerequisite.

    CS51 satisfies the PAC 3 requirement.

    The fall 2004 version of CS51 meets three times a week in Andrew 257. The lectures are on Tuesdays and Thursdays from 2:45-4:00; the labs are on Wednesday evenings from 7:00-8:15.

    The final is scheduled for 2PM on Tuesday, December 14th.

  • Administrivia <ps><pdf>
  • Lectures and Labs

    Topics listed for dates in the future should be understood to be tentative.

    Week Tuesday Wednesday lab Thursday
    8/30 intro to cs51 and java
    <pdf>
    using emacs, javac, java
    <pdf>
    classes in java
    interface vs. implementation
    <pdf>
    Thermostat handout <pdf>
    9/6 variables, constants, assignment
    fundamental data types
    <pdf>
    using pre-defined classes
    console input
    <pdf>
    implementing classes
    <pdf>
    9/13 implementing classes
    <pdf>
    code for WaterBottle.java
    implementing classes
    Pong
    booleans, copying objects,
    if and if-else constructs
    <pdf>
    9/20 switch statement, looping structures
    <pdf>
    control constructs
    <pdf>
    static methods
    the public and private keywords
    <pdf>
    9/27 applets
    <pdf>
    applets
    <pdf>
    review session
    10/4 midterm I
    class design
    <pdf>
    static instance variables, interfaces
    <pdf>
    10/11 interfaces
    <pdf>
    interfaces
    <pdf>
    inheritance
    <pdf>
    10/18 *** no class - fall recess *** inheritance
    <pdf>
    arrays
    <pdf>
    10/25 arrays
    <pdf>
    arrays
    <pdf>
    recursion
    <pdf>
    11/1 recursion
    <pdf>
    recursion
    <pdf>
    recursion, beginning of exceptions
    <pdf>
    11/8 review
    Bruce Schneier's talk at HMC midterm II
    11/15 exceptions, files
    <pdf>
    exceptions, Game of Life
    <pdf>
    files, GUIs,
    event-driven programming
    <pdf>
    11/22 event-driven programming,
    algorithm analysis
    <pdf>
    *** no class - Thanksgiving ***
    11/29 big-O, sorting
    <pdf>
    algorithms
    <pdf>
    sorting, searching
    <pdf>
    12/6 linked lists
    <pdf>
    review
    <pdf>
    *** no class - end of semester

    Problem Sets

  • Problem Set 1, due 10PM on 9/7
  • Problem Set 2, due 10PM on 9/14
  • Problem Set 3, due 10PM on 9/21
  • Problem Set 4, due 10PM on 9/28
  • Problem Set 5, due 10PM on 10/5
  • Problem Set 6, due 10PM on 10/12
  • Problem Set 7, due 7PM on 10/20
  • Problem Set 8, due 10PM on 10/26
  • Problem Set 9, due 10PM on 11/2
  • Problem Set 10, due 10PM on 11/9
  • Problem Set 11, due 10PM on 11/30
  • Problem Set 12, due 10PM on 12/7
  • Links

  • Basic DOS commands.
  • Java documentation. The documentation for all the Java packages
  • Emacs manual. Emacs basics.
  • How to install emacs on your home machine (writeup by Prof. Marshall).
  • Emacs for OS X.
  • Resources for the class textbook.

  • "Computer science is no more about computers than astronomy is about telescopes."
    --Edsger W. Dijkstra