In the DisplayBoard class, I see that it contains:
private Handicapped handicappedSpot;
private Compact compactSpot;
private Large largeSpot;
private MotorCycle motorCycleSpot;
However these are single parking spots and don’t really contain information about the number of free spots for the entire parking lot? Shouldn’t the number of free spots be kept track as part of parking lot, which is designed as a singleton pattern for the whole system? Thank you in advance for any clarification you can provide. Thanks
Course: Grokking the Low Level Design Interview Using OOD Principles - Learn Interactively
Lesson: https://www.educative.io/courses/grokking-the-low-level-design-interview-using-ood-principles/7D6XVRqxXVj