public override IPaqueteria CrearPaqueteria()
        {
            Fedex        fedex        = new Fedex();
            BarcoFactory barcoFactory = new BarcoFactory();

            fedex.AgregarTransporte(barcoFactory.CrearTransporte());
            return(fedex);
        }
Esempio n. 2
0
        public override IPaqueteria CrearPaqueteria()
        {
            Dhl          PaqueteriaDhl = new Dhl();
            AvionFactory avionFactory  = new AvionFactory();
            BarcoFactory barcoFactory  = new BarcoFactory();

            PaqueteriaDhl.AgregarTransporte(avionFactory.CrearTransporte());
            PaqueteriaDhl.AgregarTransporte(barcoFactory.CrearTransporte());

            return(PaqueteriaDhl);
        }
        public override IPaqueteria CrearPaqueteria()
        {
            Estafeta     estafeta     = new Estafeta();
            TrenFactory  trenFactory  = new TrenFactory();
            BarcoFactory barcoFactory = new BarcoFactory();

            estafeta.AgregarTransporte(trenFactory.CrearTransporte());
            estafeta.AgregarTransporte(barcoFactory.CrearTransporte());

            return(estafeta);
        }