Design: Parking Lot System with Strategy Pattern
Design focuses on the parking strategy pattern implementation and core parking operations. User authentication, payment processing, and physical hardware integration are out of scope.
Functional Requirements
FR1: Support multiple parking strategies (e.g., nearest spot, largest spot, electric vehicle spot).
FR2: Allow dynamic selection and switching of parking strategies at runtime.
FR3: Handle vehicle parking and unparking operations.
FR4: Track available and occupied parking spots.
FR5: Support different vehicle types (car, motorcycle, electric car).
Non-Functional Requirements
NFR1: System should handle up to 500 concurrent parking/unparking requests.
NFR2: Parking and unparking operations should complete within 200ms.
NFR3: System availability target is 99.9% uptime.
NFR4: Design should be extensible to add new parking strategies without major code changes.
