Solution to Velocity Partners Tech Tests in Java