diff --git a/Route.java b/Route.java index db091f3..3e822a9 100644 --- a/Route.java +++ b/Route.java @@ -7,7 +7,7 @@ public class Route { private boolean tollsFlag; //stores user setting for whether to avoid tolls private boolean hwyFlag; //stores user preference for whether to avoid major highways public Vector timeEstimate; //time estimate in seconds - public Vector tollsAmount; //stores toll amount if toll roads are used + public Vector tollsAmount; //stores toll amount if toll roads are used public Destination currentDestination; //uses user-created class Destination private void updateCurrentLocation() { @@ -50,7 +50,7 @@ public class Route { public float estimateTolls(Vector route) { float runningTolls = 0; for (String[] el : route) { - runningTolls += Float.parseFloat(el[3]); + runningTolls += Double.parseDouble(el[3]); } return runningTolls; }