codes frome c plus plus design patterns and derivatives pricing