Exercise 2 of the second year Software Systems Components SH module at the University of Birmingham.