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