...

/

Getting Ready: Parking Lot

Getting Ready: Parking Lot

Make an object-oriented design for a multi-entrance and exit parking lot system.

Problem definition

A parking lot is a designated area for parking vehicles, commonly found in venues like shopping malls, sports stadiums, and office buildings. It consists of a fixed number of parking spots allocated for different types of vehicles. Each spot is charged based on the duration a vehicle remains parked. Parking time is tracked using a parking ticket issued at the entrance. Upon exit, the customer can pay using either an automated exit panel or through a parking agent, with a credit/debit card or cash as accepted payment methods.

In this LLD interview case study, your focus will be on:

  • Managing parking for various vehicle types (car, van, truck, motorcycle, etc.) across potentially multiple floors and zones.

  • Allocating and tracking parking spot availability by type (e.g., compact, large, handicapped, motorcycle).

  • Issuing and managing parking tickets for tracking entry, parking duration, and exit.

  • Handling flexible payments at automated exit panels or via human agents, supporting multiple payment methods (cash, card, coupon).

  • Implementing and enforcing pricing models that may vary by hour, spot type, or vehicle type.

  • Ensuring real-time tracking of spot occupancy and enabling efficient entry/exit flows, especially during busy periods.

  • Accommodating special considerations like handicapped spots and overflow ...