basic domain class

main
Jan Bachmann 2024-06-02 16:24:40 +02:00 committed by Jan B
parent 285c03397d
commit efec694dc7
3 changed files with 44 additions and 4 deletions

View File

@ -1,4 +0,0 @@
package domain;
public class Domain {
}

View File

@ -0,0 +1,19 @@
package domain;
public class User {
public String username;
public String password;
public String plz;
public String city;
public User(String password, String plz, String city, String username) {
this.password = password;
this.plz = plz;
this.city = city;
this.username = username;
}
}

View File

@ -0,0 +1,25 @@
package domain;
public class Vehicle {
public String typ;
public String name;
public float co2perKm;
public int averageKmPerH;
public int maxShortTripDistance;
public Vehicle(String name) {
this.typ = "bike";
this.name = name;
this.averageKmPerH = 22;
this.co2perKm = 0;
this.maxShortTripDistance = 100;
}
public Vehicle(int averageKmPerH, float co2perKm, String name) {
this.typ = "car";
this.name = name;
this.averageKmPerH = averageKmPerH;
this.co2perKm = co2perKm;
this.maxShortTripDistance = 150;
}
}