Spring Semester 2003

Calendar and Exams Office Hours Grading Course Materials QuizSite MyGrades

[01] Jan 14
[02] Jan 16
[01] Lab One
[03] Jan 21
[04] Jan 23
[02] Lab Two
Homework One
[05] Jan 28
[06] Jan 30
[03] Lab Three
[07] Feb  4
[08] Feb  6
[04] Lab Four
Homework Two
[09] Feb 11
[2/4] Midterm One
(Jordan 124 7-9pm)
[10] Feb 13
[05] Lab Five
[11] Feb 18
[12] Feb 20
[06] Lab Six
Homework Three
[13] Feb 25
[??] Makeup One
(Mo 007 2/26 7-9pm)
[14] Feb 27
[07] Lab Seven
[15] Mar  4
[16] Mar  6
Homework Four
[17] Mar 11
[18] Mar 13
[08] Lab Eight
[20] BREAK
[10] No Lab
[19] Mar 25
[20] Mar 27
[09] Lab Nine
Homework Five
[21] Apr  1
[03] Midterm Two
[22] Apr  3
[10] Lab Ten
[23] Apr  8
[24] Apr 10
[11] Lab Eleven
[25] Apr 15
[26] Apr 17
[12] PMU
[27] Apr 22
[28] MTM
[13] Lab Twelve
[29] Apr 29
[30] May  1
[14] Last Lab
[30] FINAL
(Tue May 6
5-7pm RH100)

Syllabus (Calendar and Exams)

Here's a brief syllabus for A201/A597/I210 this semester:

  1. Introduction.
  2. Fundamental data types.
  3. User-defined types.
  4. Decisions.
  5. Iteration.
  6. More about methods.
  7. Inheritance.
  8. Arrays and vectors.
  9. Algorithms.
  10. Applets.
  11. Basic event-handling.
  12. Basic graphical user interfaces.
  13. Introduction to threads.
  14. Basic video game design with Java.
  15. Case-study one: The alien landing game.
  16. Case-study two: A penguin in an Iceblox world.

Here now is a somewhat more detailed perspective on it:

  1. (Introduction)

    What computers can do and how. Programming languages. Java. Syntax. Writing simple programs for a robot-like penguin in rectangular world. Objects in Java and the syntax of method invocation. The edit-compile-run loop. Syntax of the simplest running program in Java, and the structure of main.

  2. (Fundamental data types)

    More examples of algorithms: a simple investment problem; positional algorithms for addition and multiplication of integers; calculating the greatest common divisor by Euclid's method; sorting a list of numbers.

    Simple programs that print strings. Syntax of strings. Simple expressions with numeric value. Number types. Integer vs. floating-point numbers. Some issues of precision and internal representation. Symbolic names. Variables. Declaration and initialization of (local) variables.

    Assignment statements. Operators, operands, precedence tables, left to right associativity, order of evaluation. Type conversion: casting a float value for assignment into an integer variable. Method invocation revisited. Math methods that return values: Math.sqrt(), Math.round(), Math.floor(), Math.ceil(), Math.pow(), Math.abs(), Math.max(), etc. Other integer types. Infinite-precision arithmetic with big number objects.

    Basic I/O in Java. Using ConsoleReader (a helper class) to write simple interactive programs. Objects revisited: using java.awt.Rectangle in a few programs. Basic introduction to the standard Java API and packages. Primitive types vs. reference types.

  3. (User-defined types)

    Basic modeling: designing a simple BankAccount class with one instance variable (the balance) and three instance methods (getBalance, withdraw, and deposit). Basic introduction to methods: their names and signatures.

    More about methods: return types. Parameters, arguments. Constructors as initialization procedures. Instance variables vs. local variables. Basic terminology in the context of this example: mutators vs. accessors.

    The null reference.

    The this keyword for self-reference. The use of this() in constructors.

  4. (Decisions)

    The boolean primitive type. Simple boolean algebra. De Morgan's laws. Syntax of an if statement. Nested branches, the dangling else problem.

    Relational operators. Comparing floating point numbers. The difference between reference and primitive types when comparing for equality.

    Indentation and style in writing programs.

  5. (Iteration)

    Basic while loops in the context of the investment problem from the beginning. Infinite loops. Syntax of the for and do-while loops. Equivalence between while and for loops. "Off by one" errors, the loop and a half problem. More syntax: break and continue. Nested loops and two-dimensional patterns. Loop invariants, correctness proofs (Euclid's algorithm).

    Case studies: generating random numbers, and using them in Monte Carlo experiments. Experimentally determining the value of pi. Frequencies and probabilities. Traversing the characters in a String using charAt(). The primitive type char and its relationship to integers. Using StringTokenizer to simulate a stack of String values in an interactive program. Strings and stacks as linear structures that anticipate our study of Java arrays.

  6. (More about methods)

    Classes and objects revisited: a diagrammatic review. Instance vs. static members. Variable initialization, lifetime and scope: parameters vs. local variables vs. instance variables vs. static variables. Side-effects. Recursion. Overloading. Case study: writing a Fraction class.

  7. (Inheritance)

    Basic description of the class extension mechanism through the set union of features example. Making the robot-like penguin in Iceblox smarter through class extension.

    Overriding of methods. The rule of dynamic method lookup.

  8. (Arrays and vectors)

    One-dimensional arrays of integers. Searching, counting, inserting, deleting, finding the maximum and the minimum values in an array of integers. Array parameters and return values. Parallel arrays. Arrays of objects. Vectors. Casting. Hashtables.

    Two-dimensional arrays.

  9. (Algorithms)

    Sorting: selection sort and bubble sort. Recursive methods of sorting.

  10. (Applets)

    Applets are described in the context set up at step 7 (above). The structure and life cycle of an applet. How paint() works: the rule for dynamic method lookup in action. Applets vs. applications. Basic HTML and the appletviewer application. The graphics context object and its methods. Graphical shapes, fonts, colors, and the ManyShapes applet.

  11. (Basic event-handling)

    Simple user input in an applet: listeners for the mouse and the keys. Interfaces. Events, event listeners, and event sources. Adapter classes. Implementing listeners as inner classes.

  12. (Basic graphical user interfaces)

    Windows and frames. Layout management. Basic AWT components.

    Case study: exploring the Swing documentation (the SliderTest program).

  13. (Introduction to threads)

    Definition of threads. The Runnable interface.

    The four kinds of threads programming problems:

    a) unrelated threads,
    b) related (but unsychronized) threads,
    c) mutually-exclusive threads, and
    d) communicating and mutually-exclusive threads.
    This presentation is valuable because it's meant to offer a glimpse of A202 programming, and also a short and complete course on generic threads programming (after van der Linden).

  14. (Basic video game design with Java)

    We take a look at double-buffering and implement an x-eyes applet.

  15. (Case-study one: The alien landing game)

    The program is developed step by step. It's meant to offer a clear perspective on what A202 might look like, also what it takes to create an enjoyable piece of software. (After Joel Fan.)

  16. (Case-study two: A penguin in an Iceblox world)

    Karl Hornell's 1996 original Iceblox program is used. The style of the program is completely procedural. Thus we have a very robust but extremely hard to understand computer game program. We are then presented with an alternative design that follows Hornell's organization exactly, but encodes everything using a hierarchy of classes starting with a World and an Actor class. Given that Hornell's original program is a paragon of procedural programming, the object-oriented version that we develop offers a clear understanding of the advantages that object-oriented design provides from a purely conceptual point of view.

Exams (and Grading, also see below):

Three written exams,

  1. two midterms and
  2. a final (both outside of class).

One practical exam,
  1. (during one of the labs).

Each of the 14 labs comes with
  1. a specific lab assignment
  2. to be turned in for credit.

There are six homework assignments on
  1. Types, expressions, basic statements, simple programs.
  2. User-defined types.
  3. Decisions and iteration.
  4. Programming with Java arrays.
  5. Graphics and event-handling in applets.
  6. Basic data structures (arrays, Vectors and Hashtables).

Minute papers collected every lecture count towards final grade.

There are multiple-choice exercises posted for practice in QuizSite.

Structure of labs (115 minutes long each):

The AI uses the first 15-20 minutes to go through the entire class and individually takes attendance, greets students to the lab, and asks each student to identify one or two most outstanding questions (s)he might have about the current or forthcoming lab and homework assignment. Thus the AI builds a set of FAQ for the lab, each lab, and soon learns the names of all students in the lab.

The AI combines the answers into a 20-30 min presentation which may involve student participation. The presentation is blending the topic for the day (predetermined) with the answers to the FAQ collected by the ad-hoc survey.

Last 60-70 minutes of the lab the AI again goes through the entire set of students and checks that the lab assignment has been completed. Student runs the lab program and answers one or two questions.

Grading scale for the lab:

45 points for showing up
up to 10 points for initial interaction (for the FAQ)
(4, 3, 2, or 1) x 10 points if the program is worth an A, B, C, or D.
Note: 95 is the highest A, 90 is the lowest. Points above 95 are only given for student work that is of such quality that it makes the AI want to share it with the entire class. Grade cutoffs are posted on the website, below.

Labs are meant to stimulate participation and encourage learning.

Exams and (to a significant extent) homework assignments are the main testing instruments used in the class.

Office Hours: will be posted here soon.

A schedule of office hours is listed below:

Instructor Username Days Location Time
Adrian German dgerman MT LH201D 9-10am
MTWR LH201D 1-2pm
Francisco Lara-Dammer flaradam Monday LH330A 12:45-2:45pm
Rahul Doshi rdoshi TR LH301I 2:30-3:30pm
Sid Thakur sithakur Monday LH310C 3-5pm
Ryan Cage rcage MW LH016 11:15am-12:15pm
Matt Garrett magarret TR LH016 1-2pm
Geun-Tae Kim geunkim M LH330A 10:00am-12:00pm
Ryan Baula rbaula TR LH016 2:30-3:30pm
Ngozi Uti (also Victoria) nuti MW LH401A 02:30pm-03:30pm

The rest of the hours will be posted soon.

Meanwhile here's a copy of our class entry in INSITE for your reference.

      LH025 Thu  6:50pm- 8:45pm 18 (rcage) 
      BH118 Thu  6:50pm- 8:45pm 32 (flaradam, sithakur)

      BH308 Fri  8:00am- 9:55am 21 (geunkim, sithakur)

      SB221 Fri 10:10am-12:05pm  9 (flaradam)
      BH308 Fri 10:10am-12:05pm 23 (rbaula, geunkim)

      BU407 Fri 11:15am- 1:10pm 21 (magarret, nuti)

      SB221 Fri 12:20pm- 2:15pm 29 (rdoshi, rcage)
      LH025 Fri 12:20pm- 2:15pm 18 (dgerman, rbaula)

      LH025 Fri  2:30pm- 4:25pm 18 (magarret, nuti)
      BH308 Fri  2:30pm- 4:25pm 21 (rdoshi, dgerman)
The above is the schedule of labs and assignment of lab instructors.

Grading Scale (as mentioned above)

Course grades will be determined as follows:

Component Weight
6 Homework Assignments 25%
14 Lab Assignments 30%
Midterm Exam One 10%
Midterm Exam Two 10%
Practical Exam 15%
Final Exam 15%
Lecture Minute Papers 5%
TOTAL 110%

The overall cutoff scale is as follows:

0-54 55-65 66-67 68-69 70-75 76-77 78-79 80-85 86-87 88-89 90-95 96-100
F D D+ C- C C+ B- B B+ A- A A+

Course Materials

The textbook is pictured on the right.

Here's what you will need, in essence:

If you want to work from home you will need to install your own compiler. We might be able to assist you with that, but we make no promise. Lecture notes and lab notes will be posted regularly together with reading assignments.

We will be checking out the on-line API (from Sun) frequently.

Here's a no frames, and complete

(plus a few extensions) for all packages from the same web site.

And the author's

Here's the

Here also is the author's for the book, in case you need it.

Last updated: Feb 4, 2003 by Adrian German for A201