From b4dd6a32d0e9eea16f6471a2999b777a49fb0667 Mon Sep 17 00:00:00 2001 From: Fennel Kora Date: Sun, 14 Apr 2024 01:18:48 -0400 Subject: [PATCH] changed tollsEstimate from Float to Double --- Route.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }