package us.deans.pigs.client; import us.deans.pigs.api.*; import us.deans.pigs.base.AbstractAnimal; import org.apache.log4j.Logger; public class Story { final static Logger logger = Logger.getLogger(Story.class); static AnimalFactory god = null; static AbstractAnimal wolf = null; static Pig[] pigs = new Pig[3]; public static void main(String[] args) { // instantiating a class - direct variable assignment so... THIS class is DEPENDENT on the Chapters class. logger.info("log test..."); god = new AnimalFactory(); Chapters story = new Chapters(god); story.chapter_01(); // factory method = wolf story.chapter_02(); // factory method = pig1 + house1 story.chapter_03(); // dependency injection = pig2 + house2 story.chapter_04(); // reflection = pig3 + house3 story = null; } }