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();
        }
Ejemplo n.º 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();
        }