private boolean isChiffre() {
return Character.isDigit(c);
}
- public double evaluer() {
- return 0.0;
+
+ public double evaluer() throws NotDigitException {
+ if(isChiffre()) {
+ return Character.getNumericValue(c);
+ } else {
+ throw new NotDigitException(c + " is not a digit");
+ }
}
}