18 lines
287 B
Java
18 lines
287 B
Java
|
|
|
||
|
|
public class Moto implements Vehicule{
|
||
|
|
private String type;
|
||
|
|
private int roues;
|
||
|
|
|
||
|
|
public Moto(){
|
||
|
|
this.type = "moto";
|
||
|
|
this.roues = 2;
|
||
|
|
}
|
||
|
|
|
||
|
|
public int nbRoues(){
|
||
|
|
return this.roues;
|
||
|
|
}
|
||
|
|
|
||
|
|
public String sorte(){
|
||
|
|
return this.type;
|
||
|
|
}
|
||
|
|
}
|