Exemplo n.º 1
0
        public static void Main()
        {
            BikeFactory factory  = new BikeFactory();
            IBike       roadBike = factory.GetBike("RoadBike");

            Console.WriteLine(roadBike.Description);
        }
Exemplo n.º 2
0
        public static void Main()
        {
            BikeFactory factory = new BikeFactory();

            IBike roadBike = factory.GetBike("RoadBike");

            roadBike.FrameSize = 54;

            Console.WriteLine(roadBike.Description + " with " + roadBike.FrameSize);

            IBike anotherBike = factory.GetBike("RoadBike");

            Console.WriteLine(anotherBike.Description + " with " + anotherBike.FrameSize);

            Console.ReadLine();
        }