travel_time method implemented

distance_related_methods
Selim Eser 2024-06-09 18:12:54 +02:00
parent 7439e5159c
commit 5a5f86db98
1 changed files with 6 additions and 1 deletions

View File

@ -245,7 +245,12 @@ public class System {
}
public String[] travel_time(String destination_zip){
return new String[1];
String[] result = new String[2];
result[0] = "" + (Double.parseDouble(distance(destination_zip).replace(" km", "")) / current_user.getCar_avg_kmh()) + " h";
result[1] = "" + (Double.parseDouble(distance(destination_zip).replace(" km", "")) / current_user.getBike_avg_kmh()) + " h";
return result;
}
public String calc_co2(String destination_zip){