Revue.java 647 Bytes
package src;
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(emprunte){
            throw new NonDisponibleException();
        } else {
            if(date > dateEdit +7){
                this.emprunte = true;
                this.compteur ++;
            }else{
                throw new NonDispoException();
            }
        }
	}

    

}