changed tollsEstimate from Float to Double
This commit is contained in:
parent
d0a50ae260
commit
b4dd6a32d0
1 changed files with 2 additions and 2 deletions
|
@ -7,7 +7,7 @@ public class Route {
|
||||||
private boolean tollsFlag; //stores user setting for whether to avoid tolls
|
private boolean tollsFlag; //stores user setting for whether to avoid tolls
|
||||||
private boolean hwyFlag; //stores user preference for whether to avoid major highways
|
private boolean hwyFlag; //stores user preference for whether to avoid major highways
|
||||||
public Vector<Double> timeEstimate; //time estimate in seconds
|
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
|
public Destination currentDestination; //uses user-created class Destination
|
||||||
|
|
||||||
private void updateCurrentLocation() {
|
private void updateCurrentLocation() {
|
||||||
|
@ -50,7 +50,7 @@ public class Route {
|
||||||
public float estimateTolls(Vector<String[]> route) {
|
public float estimateTolls(Vector<String[]> route) {
|
||||||
float runningTolls = 0;
|
float runningTolls = 0;
|
||||||
for (String[] el : route) {
|
for (String[] el : route) {
|
||||||
runningTolls += Float.parseFloat(el[3]);
|
runningTolls += Double.parseDouble(el[3]);
|
||||||
}
|
}
|
||||||
return runningTolls;
|
return runningTolls;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue