diff --git a/Route.java b/Route.java index 4b6ac65..d7f0be7 100644 --- a/Route.java +++ b/Route.java @@ -39,8 +39,14 @@ public class Route { routeSelected = userSelection; } - public void estimateTolls(double[][] route) { + public int getRouteSelected() {return routeSelected;} + public float estimateTolls(double[][] route) { + float runningTolls = 0; + for (int i = 0; i <= route.length; i++) { + runningTolls += route[i][3]; + } + return runningTolls; } public double estimateTime(double[][] route) {