Esempio n. 1
0
        static void Main(string[] args)
        {
            IBikeFactory factory = new SamFactory();
            Body         body    = factory.CreateBody();
            Wheel        wheel   = factory.CreateWheel();


            Console.WriteLine(body.GetType());
            Console.WriteLine(wheel.GetType());

            factory = new GtFactory();
            body    = factory.CreateBody();
            wheel   = factory.CreateWheel();


            Console.WriteLine(body.GetType());
            Console.WriteLine(wheel.GetType());
        }