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