fin
This commit is contained in:
18
DEV2.1/Polymophisme/ex1/Moto.java
Normal file
18
DEV2.1/Polymophisme/ex1/Moto.java
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user