Object-oriented design interview questionMedium
Uber

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.

1. Problem Statement

Design an application that controls multiple smart-home device types, such as a fan and a TV. Every device supports generic commands common to all devices (turn on/off), and some devices support additional device-specific commands. The starter workspace includes one possible shared Device abstraction, described in its README; assess whether to keep or refactor it, then clarify and state your own assumptions about the exact command set before designing.

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
    Assessment of the supplied shared abstraction
  • 2
    Generic vs. device-specific command modeling
  • 3
    Command dispatch/extensibility across heterogeneous device types
  • 4
    Clarifying an intentionally ambiguous prompt

4. What Strong Candidates Should Demonstrate

  • Evaluate the supplied shared Device abstraction and justify retaining, slimming, or refactoring it.
  • Design generic vs. device-specific command dispatch without a large conditional over device type.
  • Drive an intentionally underspecified prompt by asking targeted clarifying questions.
  • Add a new device type without modifying existing device classes (Open/Closed Principle).

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 DesignCommand PatternExtensibility

Continue preparing

Build a complete software engineer mock interview plan

Related Object-Oriented Design

Design a Meeting Room Booking System

Design a class-level system for booking meeting rooms: register a room, book a meeting given a start time and duration, and cancel an existing meeting with correct conflict detection.

Related Object-Oriented Design

Design a Social Networking Platform

Design a social networking domain model covering users and profiles, friendship requests and symmetric friendships, and posts with a visibility setting, comments, and reactions — enforcing symmetric friendship, unique requests, author ownership, and visibility-based read authorization.

Related Object-Oriented Design

Design a Vending Machine Controller

Design a vending machine that manages inventory, accepts money, supports product selection and cancellation, returns change, and enforces a clear transaction state machine.

Related Object-Oriented Design

Design an Expense Management System

Model the core domain objects, state transitions, approval policies, and audit history for an employee expense management system.