This commit is contained in:
Rémi Heredero
2021-11-19 08:07:14 +01:00
commit 4b812f019a
207 changed files with 422024 additions and 0 deletions

View File

@ -0,0 +1,23 @@
package POO.T2_constructeurs;
public class Car {
String color = "";
String type = "";
int maxSpeed;
public Car(String type, String color, int maxSpeed){
this.type = type;
this.color = color;
this.maxSpeed = maxSpeed;
}
public String getStringRepresentation() {
String s = type;
s += " ";
s += color;
s += ", vitesse max: ";
s += maxSpeed;
s += "km/h";
return s;
}
}