Homework 1
The first assignment uses OCaml to illustrate pattern matching, recursion, and the use of higher-order functions as means of abstraction. Submission due on Blackboard by 11:59 pm, March 8 (Tuesday) [ download assignment document ]
Homework 2
The second assignment uses Java, and focuses on abstraction using polymorphism, as well as modularity and the use of the type hierarchy as means to achieve such abstraction. Submission is due on Blackboard by 11:59 pm, Apr 11 (Monday). [ download assignment document ] [ download code ]
Homework 3
The third assignment is also Java-based, but the topic shifts away from polymorphism alone, and mixes parametric polymorphism with functional programming. Submission is due on Blackboard by 11:59 pm, Apr 25 (Monday). [ download assignment document ]
Homework 4
The fourth assignment (again in Java) explores the iteration abstraction, connecting parametric and subtype polymorphism to the iterator design pattern presented in class. It also revisits a popular algorithm, but in a concurrent setting. This assignment is due on Blackboard by 11:59 pm, May 9 (Monday).
The assignment document comprises three questions, but the document contains the fifth assignment as well. For homework 4, you only need to submit the Java code (i.e., your solution to the first two questions).
Homework 5
The fifth and final assignment explores the iteration abstraction in Python, and demonstrates how concurrency can be a feature even without a multi-threaded environment. In particular, it illustrates the use of coroutines for this purpose (in contrast with Java, which does not have coroutines). This assignment is due on Blackboard by 11:59 pm, May 13 (Friday).
There is no separate assignment document. This assignment is simply the third and final problem in the document provided for homework 4.