main
Caro 2024-06-18 00:36:47 +02:00
parent 1bb8d15014
commit a00963768f
9 changed files with 8 additions and 4 deletions

View File

@ -7,6 +7,7 @@ public class Auto {
public Auto(String name, double co2AusstossProKm) { public Auto(String name, double co2AusstossProKm) {
this.name = name; this.name = name;
this.co2AusstossProKm = co2AusstossProKm; this.co2AusstossProKm = co2AusstossProKm;
} }

View File

@ -11,7 +11,7 @@ public class KurztripEmpfehlung {
private Ort heimatort; private Ort heimatort;
public KurztripEmpfehlung(User user) { public KurztripEmpfehlung(User user) {
// this.alleOrte = ladeAlleOrte();
this.heimatort = null; this.heimatort = null;
} }

View File

@ -13,8 +13,6 @@ public class Ort {
public Ort(int plz, String name) { public Ort(int plz, String name) {
this.plz = plz; this.plz = plz;
this.name = name; this.name = name;
// this.breitengrad = breitengrad;
// this.längengrad = längengrad;
} }
public String getAktuellesWetter() { public String getAktuellesWetter() {

View File

@ -24,6 +24,7 @@ public class Reiseplanung {
} }
public double berechneEntfernung(Ort standort, Ort zielort) { public double berechneEntfernung(Ort standort, Ort zielort) {
double b1 = Math.toRadians(standort.getBreitengrad()); double b1 = Math.toRadians(standort.getBreitengrad());
double b2 = Math.toRadians(zielort.getBreitengrad()); double b2 = Math.toRadians(zielort.getBreitengrad());
double l1 = Math.toRadians(standort.getLängengrad()); double l1 = Math.toRadians(standort.getLängengrad());

View File

@ -92,6 +92,7 @@ public class User {
} }
public boolean einloggen() { public boolean einloggen() {
try (BufferedReader reader = new BufferedReader(new FileReader("users.txt"))) { try (BufferedReader reader = new BufferedReader(new FileReader("users.txt"))) {
String line; String line;
while ((line = reader.readLine()) != null) { while ((line = reader.readLine()) != null) {

View File

@ -13,6 +13,7 @@ import org.json.JSONObject;
public class WetterService { public class WetterService {
private static final String API_KEY = "fc01dfd47f80659f12512c295e80b201"; private static final String API_KEY = "fc01dfd47f80659f12512c295e80b201";
private static final HttpClient client = HttpClient.newHttpClient(); private static final HttpClient client = HttpClient.newHttpClient();

View File

@ -23,7 +23,7 @@ private KurztripEmpfehlung kurztripEmpfehlung;
alleOrte = ladeAlleOrte(); alleOrte = ladeAlleOrte();
// this.kurztripEmpfehlung = new KurztripEmpfehlung();
} }
public List<Ort> ladeAlleOrte() { public List<Ort> ladeAlleOrte() {

View File

@ -18,6 +18,7 @@ public class UserFassade {
} }
public User einloggen(String username, String password) { public User einloggen(String username, String password) {
User user = new User(username, password, null, null, 0, 0); User user = new User(username, password, null, null, 0, 0);
if (user.einloggen()) { if (user.einloggen()) {
return user; return user;

View File

@ -28,6 +28,7 @@ public class UserInterface {
boolean exit = false; boolean exit = false;
System.out.println("\t\t\t Willkommen zur Travel-Buddy-App!"); System.out.println("\t\t\t Willkommen zur Travel-Buddy-App!");
System.out.println("\t\t\t --------------------------------"); System.out.println("\t\t\t --------------------------------");
while (!exit) { while (!exit) {
System.out.println("1. Registrieren"); System.out.println("1. Registrieren");
System.out.println("2. Einloggen"); System.out.println("2. Einloggen");