diff --git a/TravelBuddyApp/dependency-reduced-pom.xml b/TravelBuddyApp/dependency-reduced-pom.xml new file mode 100644 index 0000000..75cd7d4 --- /dev/null +++ b/TravelBuddyApp/dependency-reduced-pom.xml @@ -0,0 +1,124 @@ + + + 4.0.0 + hs-mannheim.de + TravelBuddyApp + 0.0.1-SNAPSHOT + + + + maven-compiler-plugin + 3.8.1 + + ${maven.compiler.source} + ${maven.compiler.target} + + + + maven-shade-plugin + 3.2.4 + + + package + + shade + + + + + de.hs_mannheim.informatik.mvn.Main + + + + + + + + org.jacoco + jacoco-maven-plugin + 0.8.12 + + + + prepare-agent + + + + report + test + + report + + + + + + maven-pmd-plugin + 3.22.0 + + + verify + + check + + + + + + org.owasp + dependency-check-maven + 9.2.0 + + + + check + + + + + + + + + org.junit.jupiter + junit-jupiter-api + 5.8.1 + test + + + opentest4j + org.opentest4j + + + junit-platform-commons + org.junit.platform + + + apiguardian-api + org.apiguardian + + + + + org.junit.jupiter + junit-jupiter-engine + 5.8.1 + test + + + junit-platform-engine + org.junit.platform + + + apiguardian-api + org.apiguardian + + + + + + 21 + 21 + UTF-8 + + diff --git a/TravelBuddyApp/src/main/java/domain/Auto.java b/TravelBuddyApp/src/main/java/domain/Auto.java index df73876..819ef57 100644 --- a/TravelBuddyApp/src/main/java/domain/Auto.java +++ b/TravelBuddyApp/src/main/java/domain/Auto.java @@ -3,13 +3,27 @@ package domain; public class Auto { private String name; - private double co2AusstossProKm; + private double co2AusstossProKm; + + public Auto(String name, double co2AusstossProKm) { + this.name = name; + this.co2AusstossProKm = co2AusstossProKm; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public double getCO2AusstossProKm() { + return co2AusstossProKm; + } + + public void setCO2AusstossProKm(double co2AusstossProKm) { + this.co2AusstossProKm = co2AusstossProKm; + } - - public Auto(String name, double co2AusstossProKm) { - this.name = name; - this.co2AusstossProKm = co2AusstossProKm; - } - - } diff --git a/TravelBuddyApp/src/main/java/domain/Ort.java b/TravelBuddyApp/src/main/java/domain/Ort.java index f04877a..75b13a1 100644 --- a/TravelBuddyApp/src/main/java/domain/Ort.java +++ b/TravelBuddyApp/src/main/java/domain/Ort.java @@ -1,20 +1,53 @@ package domain; +import java.io.IOException; + public class Ort { private String plz; - private String name; - - + private String OrtName; + public Ort(String plz, String name) { - this.plz = plz; - this.name = name; - } - + this.plz = plz; + this.OrtName = name; + } + + public String getPLZ() { + return plz; + } + + public void setPLZ(String plz) { + this.plz = plz; + } + + public String getOrtName() { + return OrtName; + } + + public void setName(String name) { + this.OrtName = name; + } + + @Override + public String toString() { + return OrtName + " (" + plz + ")"; + } + + public String getAktuellesWetter() { + try { + return WetterService.getAktuellesWetter(OrtName); + } catch (IOException | InterruptedException e) { + e.printStackTrace(); + return "Fehler beim Abrufen des aktuellen Wetters"; + } + } public String getWettervorhersage() { - - - return "Wettervorhersage"; + try { + return WetterService.getWettervorhersage(OrtName); + } catch (IOException | InterruptedException e) { + e.printStackTrace(); + return "Fehler beim Abrufen der Wettervorhersage"; + } } } diff --git a/TravelBuddyApp/users.txt b/TravelBuddyApp/users.txt new file mode 100644 index 0000000..e69de29