basic domain class
parent
285c03397d
commit
efec694dc7
|
@ -1,4 +0,0 @@
|
|||
package domain;
|
||||
|
||||
public class Domain {
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue