Parking Lot Object-Oriented Design

Asked at Microsoft · System Design for ML · Difficulty: Medium · Last asked Jun 30, 2026

Design and implement the core of a parking lot system. The lot has spots of three sizes, accepts three kinds of vehicles, assigns each arriving vehicle a spot that fits, and charges a fee when it leaves. Model it with clear classes so that a new vehicle type or a new pricing rule can be added without rewriting the lot.

Loading the problem…