Java weekly programming exercises