1. 17:03 3rd Dec 2010

    notes: 5

    Review Questions: Answers

    Here are my written up answers to all of the review questions covered Thursday during the lab session and on Friday in class: Review Question Answers. (I fixed a small typo and re-uploaded this document on Friday, 12/3 at 7:30pm - if you downloaded it before then, get the updated version!)

    My commitments next week are next Wednesday, a meeting from 2:30 to 4:00’ish, and then it also appears I have been asked to go to two Tuesday afternoon (1:00-4:00pm) meetings as well.  Other than that I should be around if you want to ask questions - I will also be available by email.

     
  2. Test 3 (Final Exam)

    Here is the study guide, with a few practice problems, for the final exam.  The final exam is scheduled for Friday, December 10th at 2:00pm in Manchester Hall Room 241 (our normal classroom).

     
  3. Wednesday, 12/1/2010

    In lecture today, recursion was continued, as well as a period for course evaluations.

    The main recursion points covered were:

    • additional math sequences & series defined recursively
    • viewing arrays in a recursive way (head element, tail subarray)
    • an overview of the relationship between loops and recursion
    • thinking about what is going on behind the scenes in recursion when it is running
    • thinking about whether recursion is simpler to read and write than other styles of problem solving

    Here are the lecture notes

    Here is the recursive fibonacci program we looked at, and a trace (text file) of what it was outputting to the screen (which helps reveal how recursion worked behind the scenes).

     
  4. Monday, 11/29/2010

    In lecture on Monday, recursion was introduced, including the following topics:

    • the general notion of recursion & recursive functions
    • fractals (self similar images) and how recursive functions can draw fractals
    • math operations/series/sequences based on recursion

    Here are the lecture notes.

    Here are the various circle fractal programs we looked at:

    and the factorial math program we looked at: Recursive Factorial and output that it generates (showing how it works behind the scenes): factorial2Outputs.txt

     
  5. Monday, 11/22/2010

    In lecture today, we discussed the notions of compilation and interpretation - techniques to translate from high level programming languages like Processing to the binary language CPUs can understand and execute.  Here are the notes from today.

     
  6. Friday, 11/19/2010

    In lecture, we worked on the lab from the previous day, focusing mainly on the CommissionedEmployee class.

     
  7. Lab 11, 11/18/2010 

    In today’s lab, you will be writing a program that employs inheritance and file input. Here are the files you will need:

    It will probably be pretty useful to look at the BankAccount/SavingsAccount files below during the lab, as they are examples of the relationship we will be trying to build between an Employee class and its subclass during the lab.

     
  8. An Example of Inheritance

    Here’s code providing an example of inheritance using BankAccount and SavingsAccount.  The various nuances of the inheritance syntax should all be present here.  The file SavingsAccount.pde has a number of comments explaining what exactly the different syntax and functions are doing.

    Lab #11 documents will be posted tomorrow (Thursday) morning.

     
  9. Wednesday, 11/17/2010

    In lecture today, we covered the following topics:

    • Reviewed the latest quiz (I will post the key soon)
    • Discussed inheritance in more detail, particularly focusing on designing inheritance hierarchies and the syntax for inheritance

    Here are the notes from Wednesday.

     
  10. Monday, 11/15/2010

    On Monday, the following topics were covered in lecture:

    • Processing input/output
    • Java input/output (the “behind-the-scenes” of Processing)
    • the notion and key concepts behind the idea of inheritance

    Here is a PDF of the slides that were presented.

    Example code: