ERIM 2014 PROGRAMMING EXERCISE 7