Example #1
0
 public int getDistanceToDestinationCost(StopOrHub destination) {
   return bus.getDistanceFromTo(location, destination.getLocation()) * bus.getMileageCost();
 }
Example #2
0
 public int getDistanceFromPreviousCost() {
   if (previousBusOrStop == null) {
     return 0;
   }
   return getDistanceFrom(previousBusOrStop) * bus.getMileageCost();
 }