daily pastebin goal
45%
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public void completeOrders() {
  2.         //loop through the array of orders
  3.             //if necessary transportAllCargo();
  4.             //if necessary transportAllPassengers();
  5.             //printOrderSummary();
  6.         for (Order order : this.orders) {
  7.             if (order.getNumberOfCargo() > 0) {
  8.                 transportAllCargo(order.getNumberOfCargo(), aCargoShip, order.getDistance());
  9.                 printOrderSummary(order);
  10.             }
  11.            
  12.             if (order.getNumberOfPassengers() > 0) {
  13.                 transportAllPassengers(order.getNumberOfPassengers(), aFerryShip, order.getDistance());
  14.                 printOrderSummary(order);
  15.             }
  16.         }
  17.     }
RAW Paste Data
Top