PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Software Engineering Fundamentals/Uber

Design an object-oriented parking lot system

Last updated: Mar 29, 2026

Quick Overview

This question evaluates object-oriented design competency, including class modeling, responsibility assignment, relationships (inheritance and composition), and familiarity with design patterns and SOLID principles for representing constraints like spot sizes and vehicle types.

  • medium
  • Uber
  • Software Engineering Fundamentals
  • Software Engineer

Design an object-oriented parking lot system

Company: Uber

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: medium

Interview Round: Technical Screen

Design an object-oriented model for a parking lot management system. Requirements: - The parking lot has multiple levels; each level has multiple parking spots. - Each spot has a size: small, medium, or large. - Vehicles can be of different types: motorcycle, car, or bus/truck. - A vehicle can only be parked in a spot of a compatible size. A bus or truck may require multiple adjacent large spots. - The system must support: - Vehicle entry: find and reserve an appropriate spot (or group of spots) for an incoming vehicle. - Vehicle exit: free the spot(s) and calculate the parking fee based on time parked. - Query operations: report the number of available spots per size and per level, and whether the lot is full. Assumptions: - Ignore distributed systems concerns; you are designing an in-process object-oriented model, not a networked service. - You may assume time and payment processing are handled by simple helper components. Describe: - The main classes, their responsibilities, and key attributes. - The relationships between classes (inheritance, composition, etc.). - The main methods needed to support the above operations. - Any design patterns or principles (for example, SOLID) you apply.

Quick Answer: This question evaluates object-oriented design competency, including class modeling, responsibility assignment, relationships (inheritance and composition), and familiarity with design patterns and SOLID principles for representing constraints like spot sizes and vehicle types.

Related Interview Questions

  • Design a Real-Time Top-K Ranking System - Uber (hard)
  • Design a Parking Lot - Uber (medium)
  • Design a Parking Garage Object Model - Uber (medium)
  • Design follow/follower classes - Uber (medium)
  • Design a meeting room reservation API - Uber (medium)
Uber logo
Uber
Nov 2, 2025, 12:00 AM
Software Engineer
Technical Screen
Software Engineering Fundamentals
10
0

Design an object-oriented model for a parking lot management system.

Requirements:

  • The parking lot has multiple levels; each level has multiple parking spots.
  • Each spot has a size: small, medium, or large.
  • Vehicles can be of different types: motorcycle, car, or bus/truck.
  • A vehicle can only be parked in a spot of a compatible size. A bus or truck may require multiple adjacent large spots.
  • The system must support:
    • Vehicle entry: find and reserve an appropriate spot (or group of spots) for an incoming vehicle.
    • Vehicle exit: free the spot(s) and calculate the parking fee based on time parked.
    • Query operations: report the number of available spots per size and per level, and whether the lot is full.

Assumptions:

  • Ignore distributed systems concerns; you are designing an in-process object-oriented model, not a networked service.
  • You may assume time and payment processing are handled by simple helper components.

Describe:

  • The main classes, their responsibilities, and key attributes.
  • The relationships between classes (inheritance, composition, etc.).
  • The main methods needed to support the above operations.
  • Any design patterns or principles (for example, SOLID) you apply.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More Uber•More Software Engineer•Uber Software Engineer•Uber Software Engineering Fundamentals•Software Engineer Software Engineering Fundamentals
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.