Thoughtworks agile bootcamp problem solution in Core Java