Loading...
public class ParkingLot{
List<ParkingSpot> spots
public ParkingSpot findFirstAvaliableSpott(Vehicle vehicle) {
for (ParkingSpot spot: spots){
if (spot.park(vehicle)){
return spot;
}
}
return null;
}
}
// if return null means no avaliable spot for this type of vehicle
Explain design tradeoffs you considered. Check and explain whether your design adheres to SOLID principles. Explain how your design can handle changes in scale and whether it would be easy to extend with new functionalities. Identify areas for future improvement...