WoW
public text v1 · immutablepublic class Auto {
private static int raeder = 4;
private static int motorhaube = 1;
private static int handbremse = 1;
private int speed = 220;
private int bremsweg = 10;
public int geschwindigkeit(){
return this.speed;
}
public void beschleunigung(){
this.speed = this.speed+10;
}
public void bremsen(){
this.speed = this.speed-10;
}
}