fin
This commit is contained in:
19
DEV2.1/Polymophisme/ex1/Voiture.java
Normal file
19
DEV2.1/Polymophisme/ex1/Voiture.java
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
public class Voiture implements Vehicule{
|
||||
private String type;
|
||||
private int roues;
|
||||
|
||||
public Voiture(){
|
||||
this.type = "voiture";
|
||||
this.roues = 4;
|
||||
}
|
||||
|
||||
public int nbRoues(){
|
||||
return this.roues;
|
||||
}
|
||||
|
||||
public String sorte(){
|
||||
return this.type;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user