Foundations of Computing -- Lecture Slides Dan
Fall 2013


Lecture slides and related source code will be posted by Dan here.

Dan's Lectures

Date Topic(s)
2013-09-04, 2013-09-06 Introduction
2013-09-09, 2013-09-11, 2013-09-13 What is programming? Structure of a Java program.
week 3 Variables, expressions, and types; Reading from the keyboard; Writing to the screen.
week 4 , week 5 Using library methods, writing your own methods, if statements, boolean expressions, and comments.
week 6 Loops and iterative methods: while loops, for loops, nested loops, static variables.
week 6, week 7 Arrays, Basics of reference types, Examples of loops
week 8, week 9, week 10 Object Oriented Programming basics
  • Unit6 (draft)
  • (example using public properties which as we will see is a bad habit)
  • (example using private properties which take a bit more time to set up, but are definitely worthwhile in the end). We will cover this example after the midterm
  • (Demonstrates 3 ways of calculating the same thing. One with 3 arrays, one with Point which uses public properties (bad), and finally with Point2 which uses private properties (best method) You need to compile this with the and files since it uses them.
  • Practice Multiple choice questions Some practice questions to help you with the multiple choice part of the exam.
week 11 More advanced objects/generics: ArrayList, HashSet, HashMap
  • Unit7 Note: HashSet and HashMap are NOT examinable.
Week 11 Exception Handling
Week 12 Recursion
  • Unit8
  • (This took 1 hour to run on my computer and calculate fib(55). If you increase the size of the input by 1, I expect it to be 2 hours, increase by 2 is 4 hours, etc. Each time you increase the size by 1 it doubles the size)
  • (This was basically instantaneous to calculate fib(65). The biggest limitation is running into the maximum size of an int. Perhaps we could use long to avoid this issue or at least delay that)
Review Examples