CSI 310 Spring 2011

Syllabus and course policies.

This is the website for course assignments, notes and other resources. Blackboard is used for submitting homework, conducting discussions and tracking grades.

General Resources

Disk Drive I use in the Lectures (I'll try to update within 24 hrs of the lecture).

Week by week plan

What will happen in lectures:

  1. Quizzes on reading and lecture attention, that will count toward your grade!
  2. Live demos of programming in Java! Watch your professor get stuck on syntax errors and bugs!
  3. Think-pair-and-share to figure out how to do projects and other questions!
  4. Notes scribbled electronically by professor and presentation materials that you don't have to copy because they will go on the Web!
  5. Sometimes, cool, corny videos from UTube or visits to other cool web sites!
  6. Discussions to clear up confusion before getting frustrated at the computer!
  7. End of class quizzes or "minute papers" to see how well you learned: counts toward grade too!

Week 1

GLOBAL GAME JAM...Join the Prof. and others..at Albany's instance of the Jam class!

Day Readings/Assignments/Topics Resources
Labs no labs first week; optional orientation Fri, 1/12 11:30AM in HU-25
C01 Thu Jan 20

Happened: 2,4,6.

Week 2

Readings: GE Chapters 2 and 3

Day Readings/Assignments/Topics Resources
Labs
  • Incremental development of complete applications, submitting CSI310 homework.
  • Write code that guarantees that array elements are NEVER

    accessed with subscripts that are out of the array's bounds.

  • Begin the color separation project.
  • Lab Assignment
  • FramedPictureMaker.java
C02 Tue Jan 25
C03 Thu Jan 27

GE slides for Chapter 3 (.ppt)  (.pdf)

Week 3

Readings: GE Sections 3.3, SUPPLEMENTALS

Day Readings/Assignments/Topics Resources
Labs
C04 Tue Feb 1
C05 Thu Feb 3

Week 4

Readings: GE Chapter 7, Section 4.3; Chapter 12

Day Readings/Assignments/Topics: See Assignment 5. Resources
Labs
C06 Tue Feb 8
C07 Thu Feb 10

Week 5

Readings: GE Sections 8.1, 8.2

Day Readings/Assignments/Topics Resources
Labs
  • No new lab this week: M, T, Wed people do last week's lab, Thu, Fri lab meetings for missed labs or help with Assignment 5.
C08 Tue Feb 15 Four small images of numbers, for testing current projects::
C09 Thu Feb 17
  • Planned but deferred:
  • Future: Graphics application
  • Linked list and array implementations

  • Future Maybe: Regular expression matcher

Winter break

Week 6

Readings: GE Sections 8.3, 8.4, and 8.5

Day Readings/Assignments/Topics Resources
Labs
C10 Tue Mar 1 Some REAL CODE that manipulates or uses linked lists:
C11 Thu Mar 3
  • OPEN QUIZ: Gives important details for Assignment 6 so work it now if you haven't finished; and it will be administered for a grade during the lecture!
    • Question 1     Answer
    • Question 2     Answer
    • Discussion:
      • A Java reference/pointer/address/location CANNOT refer to any variable/field which is inside an object. Java reference/ pointer/ address/ location values can only be either the null value or the location of an entire Java object. (However, this restriction does NOT apply to C or C++, which you will learn in UAlbany's CSI333, the course that follows this course in the CS major programs.
      • If you use the Dummy-head option, the constructor of PictureList should construct the Dummy Head PositionedSceneElement, and make first, last and cursor point to it, as the first diagram on the quiz shows.

  • Assignments 6 and beyond require (for full credit) the use of self-contained methods for appropriate operations like copying the image from one Picture into another Picture.
  • Intro to stacks, recursion and the full story about method calling (next topic). The Procrastinators To Do list has the LAST task added being the FIRST task done. Recursion used to print a palindrome made from the list. The method to do this calls a "helper method" to print the palendrom starting from a given location. Dramatized by the professor banging on the whiteboard and running back and forth: There are only 3 steps:
    1. Print one description from the node at a given location.
    2. Print the palendrome starting at the next location.
    3. Print one description from the node at a given location. (Just repeat step 1.)

Week 7

Readings: Section 17.4, SUPPLEMENTALS

Day Readings/Assignments/Topics Resources
Labs
C12 Tue Mar 8
C13 Thu Mar 10
  • MIDTERM EXAM Closed book, one 8 1/2 x 11 inch paper sheet of notes.

Week 8

Readings: SUPPLEMENTALS

Day Readings/Assignments/Topics ResJAources
Labs
  • Finish "Facebook" lab from last week.
C14 Tue Mar 15
C15 Thu Mar 17

Week 9

Readings:

Day Readings/Assignments/Topics Resources
Labs
C16 Tue Mar 22
C17 Thu Mar 24
  • Project support scribbles from class
  • Activation History Tree for MergeSort
  • HOMEWORK: READ AND TRY OUT the Guzdial/Ericson stuff of Chapter 8: GET IT TO WORK YOURSELF! The next project will be based on these ideas! (You might need to use material from Chapter 7.)

Week 10

Readings: Chapters 15 and 16

Day Readings/Assignments/Topics Resources
Labs Corrections and page references to add to GE Figure 8.8, page 184:
C18 Tue Mar 29

C19 Thu Mar 31

Week 11

Readings: Chapter 17

Day Readings/Assignments/Topics Resources
Labs
C20 Tue Apr 5
C21 Thu Apr 7

  • Announcement: Paper lab work may be accepted at your next lab meeting, one week after you begin!
  • Announcement 2 re: Assignment 9:
    1. The ScaleNode class should enable you to animate a monster CHANGING IN SIZE in the same way that the MoveBranch animates some of a scene MOVING.

      The ScaleNode should extend the PictNode or the BlueScreenNode (your choice). It should have methods for getting and setting the scale factor (just like the MoveBranch has getXPos, getYPos and moveTo. The drawWidth method of ScaleNode should apply the scale method to its Picture to get another Picture to give to the turtle to drop, or to run the blueScreen method on.

    2. I think GE overlooked something when they wrote Exercise 8.10! My intention was that you create a useful DiagonalBranch class WITHOUT modifying any of the given classes. So, for this course, you should just make a DiagonalBranch object draw its children on a diagonal line that you can specify with instance variables similar to gap of the HBranch and VBranch and similar to x and y of the MoveBranch.

      (GE's class designs did not provide for methods for communicating the dimensions or locations of graphics drawn from any of the nodes, which you would need to properly get the "width and height of the previous Picture").

      If you already implemented and demonstrated a reasonable interpretation of the original Exercise 8.10, that is acceptable too!

  • Annotating and tracing the recursive Towers of Hanoii play() method.
    • The class we started with.
      1. Made the print() method print the value of this: instance methods are always called ON an object; the value of this is the reference/location/address/pointer to the object that the method is called on. We saw the pointer printed by DrJava from myGame is the same as what println() prints from this.
      2. Add the depth parameter to play()
      3. Make play print a message when it is called.
      4. Make play print a message when it returns.
      5. Make the Towers class into a Java Application by adding the public static void main method.
      6. Make a method to print N spaces, and use that to indent the call and return messages the amount of depth.
      7. Put tracing statements into the main method and the Towers constructor.
      8. Disable the printing of the moves, so we can easily see the nested activation call and returns.
    • The class we ended up with.
    • The activation history tree for playing the 3 disk game.
  • Java library class hierarchies
  • Binary search tree: scribbled example

Week 12

Readings:

Day Readings/Assignments/Topics Resources
Labs
C22 Tue Apr 12
C23 Thu Apr 14

Spring Break

Week 13

Readings:

Day Readings/Assignments/Topics Resources
Labs
C24 Tue Apr 26
    • A class is a blueprint for building objects!! (hopefully last time recited).
    • WolfDeerSimulation class
    • AgentNode class
    • LLNode class
    • Wolf class
    • Some SW engineering terms: Singleton design pattern, association vs containment, UML class diagram.
    • Beware: The class diagram expresses relationships like inheritance and aggregation among classes (as blueprints) but the data structure diagram expresses how computer memory is structured. So, the WolfDeerSimulation object has 2 references to AgentNode but only one AgentNode class is drawn in the class diagram
  • The Source Code
  • Is the real world a metaphor for computer software objects?
  • Are computer software objects metaphores for real world objects?
  • Grady Booch (one of the creators of UML) said: "The Unified Modeling Language is a graphical language used to visualize, specify, reason about, document, and construct the artifacts of a software-intensive system."
C25 Thu Apr 28

Week 14

Readings:

Day Readings/Assignments/Topics Resources
Labs
C26 Tue May 3

end

How remaining topics were covered: