Ejemplo n.º 1
0
 public bool addDeliveryVehicle(DeliveryVehicle deliveryVehicle)
 {
     if (deliveryVehicles.Contains(deliveryVehicle))
         return false;
     deliveryVehicles.Add(deliveryVehicle);
     return true;
 }
Ejemplo n.º 2
0
        public StoreFront(string id, Address locationAddress, DeliveryVehicle[] deliveryVehicles)
        {
            Id = id;
            LocationAddress = locationAddress;

            packages = new List<Package>();
            this.deliveryVehicles = new List<DeliveryVehicle>();
            this.deliveryVehicles.AddRange(deliveryVehicles);
        }
Ejemplo n.º 3
0
        public Warehouse(int volumeCapacity, int[] zipCodesServed, Transport[] transports, DeliveryVehicle[] deliveryVehicles)
        {
            VolumeCapacity = volumeCapacity;

            this.zipCodesServed = new List<int>();
            this.transports = new List<Transport>();
            this.deliveryVehicles = new List<DeliveryVehicle>();

            this.zipCodesServed.AddRange(zipCodesServed);
            this.transports.AddRange(transports);
            this.deliveryVehicles.AddRange(deliveryVehicles);
        }
 public bool addDeliveryVehicle(string id, int volumeCapacity, int weightCapacity)
 {
     DeliveryVehicle d = new DeliveryVehicle(id, volumeCapacity, weightCapacity);
     if (moveables.Contains(d))
         return false;
     moveables.Add(d);
     return true;
 }
Ejemplo n.º 5
0
 public void removeDeliveryVehicle(DeliveryVehicle deliveryVehicle)
 {
     deliveryVehicles.Remove(deliveryVehicle);
 }