Revue.java 647 Bytes
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();
            }
        }
	}

    

}