Object-oriented design interview questionMedium

Design a Multi-Floor Parking Lot

Design a parking lot that assigns compatible spots across multiple floors, issues tickets, tracks capacity, and calculates payment when vehicles exit.

1. Problem Statement

Design a multi-floor parking lot that assigns each arriving vehicle a compatible available spot, issues a ticket, tracks capacity, and releases the spot after calculating the fee at exit.

2. Live Coding Format

Work in the provided coding workspace while explaining your decisions to the live interviewer. Validation may use inline tests, examples, comments, or a verbal walkthrough.

3. Key Focus Areas

  • 1
    Vehicle and parking-spot type compatibility
  • 2
    Spot allocation and release
  • 3
    Ticket lifecycle and fee calculation
  • 4
    Capacity display and concurrent allocation

4. What Strong Candidates Should Demonstrate

  • Model vehicles, spots, floors, tickets, and gates with clear ownership.
  • Encapsulate vehicle-to-spot compatibility and occupancy transitions.
  • Separate allocation and pricing policies from parking-lot orchestration.
  • Reason about concurrent entry requests for the last compatible spot.

Want interactive feedback?

Practice this problem in the live coding workspace while the interviewer probes your clarification, implementation, trade-offs, and validation.

Continue to Dashboard

Core Concepts

Hidden because they name the technique, which a real interviewer would not tell you.

Show core concepts
Object-Oriented DesignAllocation StrategyState Modeling

Continue preparing

Build a complete software engineer mock interview plan

Related Object-Oriented Design

Design a Professional Networking Platform

Design a professional networking domain model covering members and profiles (experience/education), connection requests and undirected connections, and posts with comments and reactions, enforcing symmetric connections, no self-connection, unique pending requests, and profile-edit authorization.

Related Object-Oriented Design

Design a Question and Answer Platform

Design a Q&A platform domain model with users, questions, answers, comments, tags, votes, an accepted-answer rule, and a reputation policy, with the voting, acceptance, and reputation invariants enforced in the model.

Related Object-Oriented Design

Design a Restaurant Management System

Design a restaurant domain model covering tables and capacity, reservations for time slots, seated parties, a menu, orders with priced line items, kitchen status, and bills with payments, keeping booking and order/kitchen state transitions correct.

Related Object-Oriented Design

Design a Multi-Device Smart Home Controller

Design an application that controls multiple smart-home device types (e.g., fan, TV) supporting generic ON/OFF commands common to all devices plus device-specific commands, extensibly.