Assignment 3 Completed by Joe Harrison (in Java)