Added solution for Exercise 2.44 and 2.45.