Exercise in using the Command design pattern