Added C++ code for Analysis Chapter and extended testing framework.

I hope this is along the lines new C++ code should be added. In particular I have extended the test targets in the Makefile with a new one to cover that Analysis Chapter code.