final
parent
73e2fb1b05
commit
3f5dff7305
|
@ -124,10 +124,11 @@ public class User {
|
||||||
System.out.print("Vom welchem User möchtest du es haben? ");
|
System.out.print("Vom welchem User möchtest du es haben? ");
|
||||||
String name = sc.nextLine();
|
String name = sc.nextLine();
|
||||||
fügeindieArrayList();
|
fügeindieArrayList();
|
||||||
|
double zieltemp = userListe.get(name).ziel;
|
||||||
for (int h = 1; h < streckenListe.size(); h++) {
|
for (int h = 1; h < streckenListe.size(); h++) {
|
||||||
userListe.get(name).ziel -= streckenListe.get(h);
|
zieltemp -= streckenListe.get(h);
|
||||||
}
|
}
|
||||||
System.out.printf("Du musst noch %.2f km fahren!", userListe.get(name).ziel);
|
System.out.printf("Du musst noch %.2f km fahren!", zieltemp);
|
||||||
System.out.println();
|
System.out.println();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
|
|
||||||
|
50
|
||||||
|
|
|
@ -1 +1,5 @@
|
||||||
|
|
||||||
|
Lucia
|
||||||
|
50
|
||||||
|
159
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue