Low level design for a Parking Lot.
Design a parking lot.
- Multiple Floors: The parking lot has multiple floors with each floor having various sections.
- Different Spot Sizes: There are different sizes of parking spots to accommodate different types of vehicles. a. Sizes: S, M, L, XL b. A smaller size vehicle can be parked in a larger spot but not the vice versa.
- Automated Ticketing: On entering, vehicles should be issued a ticket that records the time of entry, and charges should be calculated at the exit based on the duration of the stay.
- Parking Spot Assignment: The system should automatically find the nearest available parking spot to minimize the distance the driver needs to walk.
- Occupancy Display: Real-time display of available spots on each floor or section.
- Multiple Entry and Exit.
- How many parking spots are we looking at? 10s? 1000s?
- Is this parking lot a building? Are there multiple levels?
- Do we fill in certain parking spots before others?
- Are there multiple entrances? (Concurrency issues)
- Are all parking spots same or they are of different sizes?
- Do we want to park closer to the entrance or the exit?
- Do we charge for the parking? Does the charge increase with time?