package models;

import exceptions.FailToParkException;
import exceptions.FailToPickException;
import strategies.HighVacancyRateStrategy;
import strategies.IdealParkingLotStrategy;

import java.util.UUID;

public class SuperParkingBoy {
    private final ParkingLot[] parkingLots;
    private final IdealParkingLotStrategy strategy;

    public SuperParkingBoy(ParkingLot... parkingLots) {
        this.parkingLots = parkingLots;
        this.strategy = new HighVacancyRateStrategy();
    }

    public UUID park(Car car) throws FailToParkException {
        return strategy.getIdealParkingLot(parkingLots).park(car);
    }

    public Car pick(UUID token) throws FailToPickException {
        for (ParkingLot parkingLot : parkingLots) {
            if (parkingLot.contains(token)) {
                return parkingLot.pick(token);
            }
        }
        throw new FailToPickException();
    }
}

@@ -21,877 +21,200 @@
 ort 
-exceptions.FailToParkException;%0Aimport exceptions.FailToPickException;%0Aimport strategies.HighVacancyRateStrategy;%0Aimport strategies.IdealParkingLotStrategy;%0A%0Aimport java.util.UUID;%0A%0Apublic class SuperParkingBoy %7B%0A    private final ParkingLot%5B%5D parkingLots;%0A    private final IdealParkingLotStrategy strategy;%0A%0A    public SuperParkingBoy(ParkingLot... parkingLots) %7B%0A        this.parkingLots = parkingLots;%0A        this.strategy = new HighVacancyRateStrategy();%0A    %7D%0A%0A    public UUID park(Car car) throws FailToParkException %7B%0A        return strategy.getIdealParkingLot(parkingLots).park(car);%0A    %7D%0A%0A    public Car pick(UUID token) throws FailToPickException %7B%0A        for (ParkingLot parkingLot : parkingLots) %7B%0A            if (parkingLot.contains(token)) %7B%0A                return parkingLot.pick(token);%0A            %7D%0A        %7D%0A        throw new FailToPickException(
+strategies.HighVacancyRateStrategy;%0A%0Apublic class SuperParkingBoy extends Boy %7B%0A    public SuperParkingBoy(ParkingLot... parkingLots) %7B%0A        super(new HighVacancyRateStrategy(), parkingLots
 );%0A 

refactor SuperParkingBoy to extend Boy.