changed tollsEstimate from Float to Double

This commit is contained in:
Fennel Kora 2024-04-14 01:18:48 -04:00
parent d0a50ae260
commit b4dd6a32d0

View file

@ -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<Double> timeEstimate; //time estimate in seconds
public Vector<Float> tollsAmount; //stores toll amount if toll roads are used
public Vector<Double> 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<String[]> route) {
float runningTolls = 0;
for (String[] el : route) {
runningTolls += Float.parseFloat(el[3]);
runningTolls += Double.parseDouble(el[3]);
}
return runningTolls;
}