Merge
parent
1bb8d15014
commit
a00963768f
|
@ -7,6 +7,7 @@ public class Auto {
|
|||
|
||||
|
||||
public Auto(String name, double co2AusstossProKm) {
|
||||
|
||||
this.name = name;
|
||||
this.co2AusstossProKm = co2AusstossProKm;
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ public class KurztripEmpfehlung {
|
|||
private Ort heimatort;
|
||||
|
||||
public KurztripEmpfehlung(User user) {
|
||||
// this.alleOrte = ladeAlleOrte();
|
||||
|
||||
this.heimatort = null;
|
||||
}
|
||||
|
||||
|
|
|
@ -13,8 +13,6 @@ public class Ort {
|
|||
public Ort(int plz, String name) {
|
||||
this.plz = plz;
|
||||
this.name = name;
|
||||
// this.breitengrad = breitengrad;
|
||||
// this.längengrad = längengrad;
|
||||
}
|
||||
|
||||
public String getAktuellesWetter() {
|
||||
|
|
|
@ -24,6 +24,7 @@ public class Reiseplanung {
|
|||
}
|
||||
|
||||
public double berechneEntfernung(Ort standort, Ort zielort) {
|
||||
|
||||
double b1 = Math.toRadians(standort.getBreitengrad());
|
||||
double b2 = Math.toRadians(zielort.getBreitengrad());
|
||||
double l1 = Math.toRadians(standort.getLängengrad());
|
||||
|
|
|
@ -92,6 +92,7 @@ public class User {
|
|||
}
|
||||
|
||||
public boolean einloggen() {
|
||||
|
||||
try (BufferedReader reader = new BufferedReader(new FileReader("users.txt"))) {
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
|
|
|
@ -13,6 +13,7 @@ import org.json.JSONObject;
|
|||
|
||||
public class WetterService {
|
||||
|
||||
|
||||
private static final String API_KEY = "fc01dfd47f80659f12512c295e80b201";
|
||||
private static final HttpClient client = HttpClient.newHttpClient();
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ private KurztripEmpfehlung kurztripEmpfehlung;
|
|||
|
||||
|
||||
alleOrte = ladeAlleOrte();
|
||||
// this.kurztripEmpfehlung = new KurztripEmpfehlung();
|
||||
|
||||
|
||||
}
|
||||
public List<Ort> ladeAlleOrte() {
|
||||
|
|
|
@ -18,6 +18,7 @@ public class UserFassade {
|
|||
}
|
||||
|
||||
public User einloggen(String username, String password) {
|
||||
|
||||
User user = new User(username, password, null, null, 0, 0);
|
||||
if (user.einloggen()) {
|
||||
return user;
|
||||
|
|
|
@ -28,6 +28,7 @@ public class UserInterface {
|
|||
boolean exit = false;
|
||||
System.out.println("\t\t\t Willkommen zur Travel-Buddy-App!");
|
||||
System.out.println("\t\t\t --------------------------------");
|
||||
|
||||
while (!exit) {
|
||||
System.out.println("1. Registrieren");
|
||||
System.out.println("2. Einloggen");
|
||||
|
|
Loading…
Reference in New Issue