LLD - Design — Parking Lot System
Why does the following implementation cause a compilation error?
class NearestSpotStrategy implements ParkingStrategy {
public ParkingSpot findSpot() {
// missing vehicle parameter
return findClosestFreeSpot();
}
}