GoF Design Patterns 4.0 pdf question #1

85   96.4
Dec 10, 2010
Page 7 states

"Continents are represented as enumerations. The AnimalWorld constructor dynamically creates the desired factory using the Continent enumerated value. "

This is not correct, at least with the code I just downloaded last night.  Continents are not dynamically created using an enumerated value.  AnimalWorld is a generic which takes the continent type as a parameter.

Is the PDF out of synch with the code?


800   99.9
Dec 12, 2010

You are right. In Design Pattern Framework 4 the AnimalWorld is a generic that takes continent type as parameter, like so:

var africa = new AnimalWorld<Africa>();

We will make the necessary correction to the pdf.