1. Outline an LLD for a Parking Lot system supporting multiple vehicle types and fee calculation.
Identify entities: ParkingLot, Floor, Spot, Ticket, Vehicle, RateCard, Payment. Use Strategy for pricing so rules vary by type and duration. A SpotSelector chooses an appropriate spot based on vehicle type and availability. Repositories manage persistence per aggregate (e.g., Ticket as root). Keep commands like enter(vehicle) and exit(ticketId). Ensure concurrency safety with atomic spot allocation and ticket issuance.
interface Pricing{ moneyFor(entry, exit, type): Money }
class Ticket{ id; spotId; entryTime; }