← All Problems
EasyObject-Oriented Design30-40 min

Design a Parking Lot System

Design an automated parking lot system with multiple floors, different vehicle sizes, and payment processing.

AmazonGoogleMicrosoftBloomberg

Functional Requirements

  • Multiple floors with different parking spot sizes
  • Support different vehicle types (motorcycle, car, bus)
  • Automated entry/exit with ticket generation
  • Payment calculation based on duration
  • Real-time availability tracking
  • Display available spots per floor/type

Steps (0/4)

Step 1: Requirements & Data Model

This is often asked as an OOD (object-oriented design) question. Define entities: ParkingLot, Floor, ParkingSpot, Vehicle, Ticket, Payment. Spot sizes: Small (motorcycle), Medium (car), Large (bus).

Key Points

  • Entities: ParkingLot, Floor, ParkingSpot, Vehicle, Ticket
  • Spot types: Small, Medium, Large
  • Vehicle types: Motorcycle, Car, Bus (bus needs multiple spots)
  • One ticket per vehicle entry
1 / 4