Assignment 3 for Programming in Java.