Finished CartesianProduct class.