Fin du TP Heritage
This commit is contained in:
16
DEV2.1/TP04/Compteur.java
Normal file
16
DEV2.1/TP04/Compteur.java
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
public class Compteur {
|
||||
private int compte;
|
||||
|
||||
public Compteur() {
|
||||
this.compte = 0;
|
||||
}
|
||||
|
||||
public void plusUn() {
|
||||
this.compte++;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return Integer.toBinaryString(this.compte);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user