The third homework for the java basics.