49443da5
Vincent Benoist
tp avance
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
public class Revue extends Ouvrage {
protected int dateEdit;
protected int num;
public Revue(String tit, String aut, int dateEdit, int num){
super(tit,aut);
this.dateEdit = dateEdit;
this.num = num;
}
public void emprunter(int date) throws NonDisponibleException,NonDispoException{
if(this.emprunte == true){
throw new NonDisponibleException();
} else {
if(date > dateEdit +7){
this.emprunte = true;
this.compteur ++;
}else{
throw new NonDispoException();
}
}
}
}
|