The second homework for the java basics course.