示例#1
0
 public bool addDeliveryVehicle(DeliveryVehicle deliveryVehicle)
 {
     if (deliveryVehicles.Contains(deliveryVehicle))
         return false;
     deliveryVehicles.Add(deliveryVehicle);
     return true;
 }
示例#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);
        }
示例#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;
 }
示例#5
0
 public void removeDeliveryVehicle(DeliveryVehicle deliveryVehicle)
 {
     deliveryVehicles.Remove(deliveryVehicle);
 }