public Car issueCar(DrivingLicense drivingLicense, String typeOfCar){
		Date now = new Date(); 
		Car c = AbstractCar.getInstance(typeOfCar, RegistrationNumber.getInstance(extracted(registrationNumber).getLetterIdentifier(), extracted(registrationNumber).getNumberIdentifier()), fuelCapacity, fuelInCar, carRented);
		long driverAge = now.getTime() - drivingLicense.getDateOfBirth().getTime();
		long licenseAge = now.getTime() - drivingLicense.getDateOfIssue().getTime();
		
		if (typeOfCar.equalsIgnoreCase("small car")){
			if(driverAge > 20*365*24*60*60*1000 && licenseAge > 1*365*24*60*60*1000 && drivingLicense.getIsFullLicense()==true){
			    c = AbstractCar.getInstance("small car", RegistrationNumber.getInstance(extracted(registrationNumber).getLetterIdentifier(), extracted(registrationNumber).getNumberIdentifier()), fuelCapacity, fuelInCar, carRented);
				fuelInCar = 49;
				carRented = true;
				CARS.remove(c);
			} else {
				throw new IllegalArgumentException("A car cannot be allocated");
			}
		} else if (typeOfCar.equalsIgnoreCase("large car")){ 
			if(driverAge > 25*365*24*60*60*1000 && licenseAge > 5*365*24*60*60*1000 && drivingLicense.getIsFullLicense()== true){
				c = AbstractCar.getInstance("small car", RegistrationNumber.getInstance(extracted(registrationNumber).getLetterIdentifier(), extracted(registrationNumber).getNumberIdentifier()), fuelCapacity, fuelInCar, carRented);
				fuelInCar = 60;
				carRented = true;
				CARS.remove(c);
			} else {
				throw new IllegalArgumentException("A car cannot be allocated");
			}
		} else{
			throw new IllegalArgumentException("That is not a suitable type of car");
		}
		RENTEDCARS.put(drivingLicense, c);
		return c;
	}