From 047b6a3f13facfc1bc6e127c07c6fa6d025f481d Mon Sep 17 00:00:00 2001 From: Daniel Zdravkovic <3012893@stud.hs-mannheim.de> Date: Thu, 6 Jun 2024 12:14:13 +0200 Subject: [PATCH 1/2] class_user_finished --- src/main/java/de/hs_mannheim/domain/User.java | 74 ++++++++++++++++++- 1 file changed, 73 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/hs_mannheim/domain/User.java b/src/main/java/de/hs_mannheim/domain/User.java index c98fb9d..b5869a4 100644 --- a/src/main/java/de/hs_mannheim/domain/User.java +++ b/src/main/java/de/hs_mannheim/domain/User.java @@ -1,5 +1,77 @@ package de.hs_mannheim.domain; public class User { - + + private String username = ""; + private String password = ""; + private String hometown = ""; + private int zip; + private String car_name = ""; + private String car_co2_kmh = ""; + private String car_avg_kmh = ""; + private String bike_avg_kmh = ""; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getHometown() { + return hometown; + } + + public void setHometown(String hometown) { + this.hometown = hometown; + } + + public int getZip() { + return zip; + } + + public void setZip(int zip) { + this.zip = zip; + } + + public String getCar_name() { + return car_name; + } + + public void setCar_name(String car_name) { + this.car_name = car_name; + } + + public String getCar_co2_kmh() { + return car_co2_kmh; + } + + public void setCar_co2_kmh(String car_co2_kmh) { + this.car_co2_kmh = car_co2_kmh; + } + + public String getCar_avg_kmh() { + return car_avg_kmh; + } + + public void setCar_avg_kmh(String car_avg_kmh) { + this.car_avg_kmh = car_avg_kmh; + } + + public String getBike_avg_kmh() { + return bike_avg_kmh; + } + + public void setBike_avg_kmh(String bike_avg_kmh) { + this.bike_avg_kmh = bike_avg_kmh; + } } From dbacd001f2ca2260c9e7122447c5e3220e69167a Mon Sep 17 00:00:00 2001 From: Selim Eser <2211482@stud.hs-mannheim.de> Date: Sat, 8 Jun 2024 15:11:49 +0200 Subject: [PATCH 2/2] Fixed User Attributes to correct type and updated getter and setter --- src/main/java/de/hs_mannheim/domain/User.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/de/hs_mannheim/domain/User.java b/src/main/java/de/hs_mannheim/domain/User.java index b5869a4..b0cd545 100644 --- a/src/main/java/de/hs_mannheim/domain/User.java +++ b/src/main/java/de/hs_mannheim/domain/User.java @@ -7,9 +7,9 @@ public class User { private String hometown = ""; private int zip; private String car_name = ""; - private String car_co2_kmh = ""; - private String car_avg_kmh = ""; - private String bike_avg_kmh = ""; + private double car_co2_kmh; + private double car_avg_kmh; + private double bike_avg_kmh; public String getUsername() { return username; @@ -51,27 +51,27 @@ public class User { this.car_name = car_name; } - public String getCar_co2_kmh() { + public double getCar_co2_kmh() { return car_co2_kmh; } - public void setCar_co2_kmh(String car_co2_kmh) { + public void setCar_co2_kmh(double car_co2_kmh) { this.car_co2_kmh = car_co2_kmh; } - public String getCar_avg_kmh() { + public double getCar_avg_kmh() { return car_avg_kmh; } - public void setCar_avg_kmh(String car_avg_kmh) { + public void setCar_avg_kmh(double car_avg_kmh) { this.car_avg_kmh = car_avg_kmh; } - public String getBike_avg_kmh() { + public double getBike_avg_kmh() { return bike_avg_kmh; } - public void setBike_avg_kmh(String bike_avg_kmh) { + public void setBike_avg_kmh(double bike_avg_kmh) { this.bike_avg_kmh = bike_avg_kmh; } }