Exercises from week 4 of Programming in Java (BBK MSc CS)