Based on exercises in Agile Java