Interface CourierOperations


public interface CourierOperations
  • Method Details

    • insertCourier

      boolean insertCourier(String courierUserName, String licencePlateNumber)
      Creates a new courier.
      Parameters:
      courierUserName - theirs user name.
      licencePlateNumber - of the vehicle that they are driving.
      Returns:
      success of operation.
    • deleteCourier

      boolean deleteCourier(String courierUserName)
      Deletes a courier by user name.
      Parameters:
      courierUserName - -
      Returns:
      success of the operation.
    • getCouriersWithStatus

      List<String> getCouriersWithStatus(int statusOfCourier)
      Parameters:
      statusOfCourier - - see project documentation.
      Returns:
      List of all couriers with specific status.
    • getAllCouriers

      List<String> getAllCouriers()
      Returns:
      List of all couriers in the system. Should be sorted by profit descending.
    • getAverageCourierProfit

      BigDecimal getAverageCourierProfit(int numberOfDeliveries)
      Parameters:
      numberOfDeliveries - that a courier has completed.
      Returns:
      average profit for couriers. Only count couriers whose number of deliveries is equal or greater than numberOfDeliveries.