[ news | information | syllabus | labs | links ]

Introduction to Computer Science
CS51 - Fall 2008

Lectures: MWF 11-11:50 in Edmunds 114
Lab: T 1:15-4 in Edmunds 229
Prof. Chen

1/9/2009: I've archived all of the notes and problem sets (ie, many 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 general announcements/thoughts/etc. You are responsible for any information posted here.
  • 12/10/2008: No TA office hours this week, but Erik and Chris will be holding their normal hours (8-10PM on Tuesday and Wednesday) next week.
  • 12/1/2008: In the second test program, you may also need to add the line:
         canvas.requestFocus();
      
    to the begin() method.
  • 11/29/2008: In the second test program, you may need to add the line:
         canvas.addKeyListener(this);
      
    at the end of the begin() method in SpaceInvadersController.
  • 10/31/2008: Erik will be running a review session for the second midterm on Tuesday (11/4) starting at 8PM in Edmunds 229.
  • 9/26/2008: Erik will be running a review session for the first midterm on Tuesday (9/30) starting at 8PM in Edmunds 229. Note that my office hours next Wednesday (10/1) are cancelled.
  • 9/22/2008: A sample midterm is available here. Note that GUIs (problem 3) and interfaces (problem 4d) will not be on our 1st midterm.
  • 9/8/2008: The 3rd and 4th chapters of the textbook are available on Sakai. That should get us through the end of this week, by which point all of you should have a copy of the textbook.
  • 9/5/2008: The TAs will be holding regular weekly office hours on Tuesdays from 8-10PM (Erik) and Wednesdays from 8-10PM (Chris). They'll be on the second floor of the Edmunds building. You can also email them to set up other tutoring hours.
  • 8/15/2008: There will be no lab on 9/2.
  • Information

    Computer Science 051 is an introduction to algorithm development emphasizing object-oriented design. Algorithms will be implemented as programs in the Java programming language. We will introduce data structures and recursion as tools to construct correct, understandable, and efficient algorithms. These topics will be developed further in CSCI 052, CSCI 062, and more advanced computer science courses. For those who wish a good introduction to the science of computing. we highly recommend the combination of CSCI 051 and CSCI 052, which includes an introduction to a broad array of topics in computer science. For those who wish a more intensive introduction to programming, we suggest the combination of CSCI 051 and CSCI 062.

    By the end of this course you should have a good basic understanding of how to develop (design, code, and debug) medium-sized programs in Java, and have a basic understanding of how one might analyze programs for correctness and efficiency.

    This course is a prerequisite for all upper level Computer Science courses. In this course we do not assume that you have had any previous computer programming experience. If you have had extensive previous experience you might consider taking cs52 or cs62 instead. Please discuss this with any member of the department's faculty if you feel you fall into this category. The required textbook for the class is the Java: An eventful approach, by Kim Bruce, Andrea Danyluk, and Tom Murtagh. I've placed an order for the book at Huntley bookstore so you should be able to find it there.

    Syllabus

    Any topics or assignments that are listed for dates in the future should be taken as (potentially very) tentative. Anything for a date at least 2 days in the past will accurately reflect what actually happened in the class.

    Week Date In class Readings for class Book problems Assignments due
    1 (Tue) 9/2 *** No class (lab) today! ***
    (Wed) 9/3 overview of java/cs51/etc, algorithms lab 0 due 11AM
    (Fri) 9/5 java basics, graphics, event handling
    methods, parameters
    Ch 1
    2 (Mon) 9/8 lab 1, variables Ch 2 1.6.2, 1.9.3
    (Tue) 9/9 lab 1 - no clicking <html> <pdf>
    (Wed) 9/10 numbers, constants, conditionals Ch 3, 4 2.7.2, 2.7.7 lab 1 due 11PM
    (Fri) 9/12 more conditionals, booleans,
    colors, random numbers
    Ch 4 3.11.2, 3.11.5, 4.2.2
    3 (Mon) 9/15 last conditional example,
    primitive types, classes
    lab 2 handout
    Ch 5
    4.8.8
    (Tue) 9/16 lab 2 - laundry <html> <pdf> design for part 1 of lab 2
    (Wed) 9/17 classes, constructors, methods Ch 6 5.7.2, 5.7.6 lab 2 due 11PM
    (Fri) 9/19 classes, parameters, variables Ch 6, 8 6.8.4, 6.9.1
    4 (Mon) 9/22 control structures lab 3 handout
    Ch 7
    8.6.2, 8.6.3
    (Tue) 9/23 lab 3 - magnets <html> <pdf> design for part 1 of lab 3
    (Wed) 9/24 active objects Ch 9.1-9.2 7.2.1, 7.10.1 lab 3 due 11PM
    (Fri) 9/26 more active objects
    more complex loops
    Ch 9.3-9.5 9.10.1, 9.10.2
    5 (Mon) 9/29 even more active objects
    interfaces
    lab 4 handout
    Ch 9.6-9.9
    9.10.3, 9.11.1
    (Tue) 9/30 lab 4 - boxball <html> <pdf> design for lab 4
    (Wed) 10/1 interfaces, debugging tips Ch 10 9.11.2, 10.5.1 lab 4 due 11PM
    (Fri) 10/3 midterm 1
    6 (Mon) 10/6 lab 5, design lab 5 handout
    Ch 10, 21
    10.5.2
    (Tue) 10/7 lab 5 - frogger <html> <pdf> design for lab 5
    (Wed) 10/8 test program 1 <html> <pdf>
    GUI components
    Ch 11.1-11.3 21.9.2 , 21.9.3 lab 5 due 11PM on 10/9
    (Fri) 10/10 more GUI components Ch 11.4-11.6
    7 (Mon) 10/13 lab 6, even more GUI components,
    keyboard input
    Ch 11.7-11.8 11.9.1
    (Tue) 10/14 lab 6 - textplay <html> <pdf>
    (Wed) 10/15 inheritance Ch 17.1-17.5 11.9.2 lab 6 due 11PM
    (Fri) 10/17 more inheritance Ch 17.6-17.7 17.8.5 Test Program 1 due 4PM
    8 (Mon) 10/20
    *** No class - fall recess ***
    (Tue) 10/21
    (Wed) 10/22 recursion Ch 12.1 17.8.6
    (Fri) 10/24 more recursion Ch 12.1 12.1.10
    9 (Mon) 10/27 lab7, even more recursion Ch 12.2
    (Tue) 10/28 lab 7 - recursive definitions <html> <pdf>
    (Wed) 10/29 for loops, arrays Ch 13 lab 7 due 11PM
    (Fri) 10/31 lab 8
    more arrays
    Ch 14.1-14.5 13.6.2, 13.6.5
    10 (Mon) 11/3 still more arrays Ch 14.6-14.8 14.2.2
    (Tue) 11/4 lab 8 - simon <html> <pdf>
    (Wed) 11/5 multidimensional arrays Ch 14.6-14.8, 15.1-15.2 14.9.3 lab 8 due 11PM
    (Fri) 11/7 midterm 2
    11 (Mon) 11/10 lab 9
    more multidimensional arrays
    Ch 15.2-15.3 15.4.1, 15.4.2
    (Tue) 11/11 lab 9 - nibbles <html> <pdf>
    (Wed) 11/12 last bit on arrays
    strings
    Ch 15.3, 16.1 15.4.4 lab 9 due 11PM on 11/13
    (Fri) 11/14 more strings Ch 16.1-16.2 16.5.2
    12 (Mon) 11/17 even more strings
    characters
    Ch 16.3-16.4 16.5.3, 16.5.4
    (Tue) 11/18 lab 10 - apples <html> <pdf>
    (Wed) 11/19 test program 2
    exceptions
    Ch 18 16.5.5, 16.5.6 lab 10 due 11PM
    (Fri) 11/21 lab 11, more exceptions, streams Ch 19.1-19.3 18.5.1
    13 (Mon) 11/24 streams and networks Ch 19.1-19.3 18.9.1, 19.7.2
    (Tue) 11/25 lab 11 - scribbler <html> <pdf>
    (Wed) 11/26 streams and networks, random things Ch 19.4 19.7.3 design for TP2 due 1PM
    lab 11 due 11PM
    (Fri) 11/28
    *** No class - Thanksgiving ***
    14 (Mon) 12/1 lab 12
    streams and networks, algorithms
    Ch 19.5-19.6
    (Tue) 12/2 lab 12 - pictionary <html> <pdf>
    (Wed) 12/3 algorithms, asymptotics, sorting Ch 20 lab 12 due 11PM
    (Fri) 12/4 sorting Ch 20 20.3.1, 20.3.4
    15 (Mon) 12/8 searching, wrap-up 20.1.4, 20.3.8
    (Tue) 12/9 work on test programs
    (Wed) 12/10 review session Test Program 2 due 4PM

    The final exam will be on Thursday 12/18 from 9AM-noon.

    Programming Assignments

  • Lab 1 - NoClicking: <html> <pdf>
  • Lab 2 - Laundry: <html> <pdf>
  • Lab 3 - Magnet: <html> <pdf>
  • Lab 4 - Boxball <html> <pdf>
  • Lab 5 - Frogger <html> <pdf>
  • Test Program 1 <html> <pdf>
  • Lab 6 - Textplay: <html> <pdf>
  • Lab 7 - Recursion: <html> <pdf>
  • Lab 8 - Simon: <html> <pdf>
  • Lab 9 - Nibbles: <html> <pdf>
  • Lab 10 - Apples: <html> <pdf>
  • Test Program 2 <html> <pdf>
  • Lab 11 - Scribbler: <html> <pdf>
  • Lab 12 - Pictionary: <html> <pdf>
  • Links

    The following documents provide information on the standard Java libraries and additional libraries developed for this course:


    "Computers do not solve problems, they execute solutions"
    --Laurent Gasser