public Holiday(int p_driverId, Calendar p_startDate, Calendar p_endDate) throws Exception{
        //instanciate the class with the variables provided
        this.driverId = p_driverId;
        this.startDate = p_startDate;
        this.endDate = p_endDate;
	Calendar acceptDates = (Calendar) startDate.clone();
        if(!this.hasEnoughDays())
            throw new NotEnoughHolidaysException();
       
        
        else {
            for(int i = 1; i <= length(); i++){
                if(this.dayIsClear(acceptDates)){
                    //for each day set the driver unavilable
                    DriverInfo.setAvailable(driverId, acceptDates.getTime(), false);
                    DriverInfo.setHolidaysTaken(driverId,DriverInfo.getHolidaysTaken(driverId) + 1);
                }
                acceptDates.add(Calendar.DAY_OF_MONTH, 1);

            }
        }

    }