Exemplo n.º 1
0
        public static void Main()
        {
            //AfricaFactory is Concrete Factory.
            //ContinentFactory is Abstract Factory.
            ContinentFactory africa  = new AfricaFactory();
            ContinentFactory america = new AmericaFactory();

            //同じ要領で操作が実行できる
            africa.CreateCarnivore();
            america.CreateHerbivore();
        }