On this page:
Lecture 1:   Design Recipe and Dr  Racket Review
Lecture 2:   Data Definitions in Java
Lecture 3:   Data Definitions:   Unions
Lecture 4:   Designing Methods:   Simple Classes
Lecture 5:   Designing Methods:   Unions
Lecture 6:   Designing Methods:   Self-referential Classes
Lecture 6a:   Designing Methods:   Lists
Lecture 7:   Abstracting over fields and methods
Lecture 11:   Designing interactive games; Using libraries
Lecture 12:   Function objects:   Boston Marathon
Lecture 12a:   Function objects:   Three questions

Lectures and Code Samples

The lecture notes cover the whole semester of the course Fundamentals of Computing and Programming 2.

While some of the lectures compare the new material with similar material students should have encountered in our first course, the text can be used by students who do not have that prerequisite.

Every lecture comes with a complete sample Java code that can be run in class or by students themselves. The code makes all ideas concrete, and it also sets an example of coding style we would like the students to follow.

Lecture 1: Design Recipe and DrRacket Review

Introduces the Design Recipe for designing functions in the context of designing static methods in Java.
Reviews the foldl and foldr loops in DrRacket and highlights the problems encountered in computing with inexact numbers.   

Lecture 2: Data Definitions in Java

Design of simple classes and classes that contain objects in another class. Uses the tester library to display the data.   

Lecture 3: Data Definitions: Unions

Design of classes that represent a disjoint union of sets of data.
Extending unions to represent self-referential data.   

Lecture 4: Designing Methods: Simple Classes

Design of methods for simple classes and classes with containment.   

Lecture 5: Designing Methods: Unions

Design of methods for unions of classes.   

Lecture 6: Designing Methods: Self-referential Classes

Design of methods for self-referential unions of classes.   

Lecture 6a: Designing Methods: Lists

Design of methods for self-referential unions of classes that represent lists.   

Lecture 7: Abstracting over fields and methods

Abstracting over common fields and methods: Abstract classes.   

Lecture 11: Designing interactive games; Using libraries

Designing interactive games; Using libraries, Extending abstract class; Deriving subclass   

Lecture 12: Function objects: Boston Marathon

Abstracting over the behavior; designing and using function objects.   

Lecture 12a: Function objects: Three questions

Abstracting over the behavior; designing and using function objects.