Pigs Nigel Deans - 06/2016 This program tells a story about a wolf and three pigs. The redundancy of the story lends to a great premise for testing different programming options. This version is broken down into three packages... 1. API - functionality exposed to the client (but probably owned by the vendor) 2. BASE - back end or abstract stuff that the client doesn't need to know anything about. (vendor) 3. Client - The client code (in this case a Console Java Application running directly on the JVM. (client) Client Package: Story class: Loads the program and initiates a sequence of calls into the Chapters class Chapters class: a collection of methods that contain the program logic for specific chapters. The idea is to make them swappable. The chapter methods form the basis for the design patterns being tested... Constructor : injects a dependency on an instance of the Animal Factory, which is stored as a class-variable as aFactory. Chapter 1: uses aFactory to return a Wolf object Chapter 2: uses aFactory to return a pig object Chapter 3: uses aFactory to return a pig object Chapter 4: uses aFactory to return a pig object