Exemple #1
0
        static void Main(string[] args)
        {
            var europe = new ToyotaAssemblyLine(new YarisFactory());
            var yaris  = europe.AssembleCar();

            Console.WriteLine(yaris);
            yaris.StartEngine();

            var japan   = new ToyotaAssemblyLine(new AvensisFactory());
            var avensis = japan.AssembleCar();

            Console.WriteLine(avensis);
            avensis.StartEngine();
        }
        static void Main(string[] args)
        {
            var EuropeFactory = new ToyotaAssemblyLine(new YarisFactory());

            var EuropeYaris = EuropeFactory.AssembleCar();

            Console.WriteLine(EuropeYaris);
            EuropeYaris.StartEngine();

            var JapanFactory = new ToyotaAssemblyLine(new AvensisFactory());

            var JapanAvensis = JapanFactory.AssembleCar();

            Console.WriteLine(JapanAvensis);
            JapanAvensis.StartEngine();

            Console.Read();
        }