Assignment 7

This is a short assignment. The goal is to understand a little better the connection between objects and higher-order functions.

Here is an Ocaml program implementing the famous Sieve of Eratosthenes algorithm for calculating prime numbers. You are to write this program in Java with the constraint that you must preserve as much as possible the original structure of the Ocaml program. In particular you must anonymous inner classes to implement the higher-order functions used in the Ocaml program.

Please consult the Java documentation on inner classes.

Turn in the file Sieve.java on the electronic submission page.