static void Main(string[] args)
        {
            var vehicleCreator = new VehicleCreator(new FordExplorerBuilder());

            vehicleCreator.CreateVehicle();
            var vehicle = vehicleCreator.GetVehicle();

            vehicle.ShowInfo();
            Console.WriteLine("---------------------------------------------");
            vehicleCreator = new VehicleCreator(new LincolnAviatorBuilder());
            vehicleCreator.CreateVehicle();
            vehicle = vehicleCreator.GetVehicle();
            vehicle.ShowInfo();
            Console.ReadKey();
        }
예제 #2
0
        static void Main(string[] args)
        {
            var vehicleCreator = new VehicleCreator(new HeroBuilder());

            vehicleCreator.CreateVehicle();
            var vehicle = vehicleCreator.GetVehicle();

            vehicle.ShowInfo();

            Console.WriteLine("---------------------------------------------");

            vehicleCreator = new VehicleCreator(new HondaBuilder());
            vehicleCreator.CreateVehicle();
            vehicle = vehicleCreator.GetVehicle();
            vehicle.ShowInfo();
        }