Object-Oriented Programming and Design Questions

The object-oriented paradigm: classes and objects, encapsulation, inheritance, polymorphism, and composition, plus SOLID and other design principles that keep object models maintainable. Covers modeling a domain in objects and defending those design choices. A staple conceptual interview across most engineering roles.

MediumTechnical
24 practiced

Implement a thread-safe in-memory token bucket rate limiter in Java or Python that supports per-user limits. Provide the public interface (e.g., initialize(capacity, refillRate), allow_request(user_id) -> bool), ensure O(1) request checks, and design the storage abstraction so it can be swapped for Redis later. Include concurrency considerations.

MediumSystem Design
30 practiced

Design a stateless 'Search Items' HTTP API for a product catalog service that must scale as the dataset grows from 10 → 10,000 items. Requirements: support pagination, sorting, future filters and facets, be easy to extend for ranking changes, and minimize breaking changes. Provide endpoints, request/response shapes, pagination strategy, and versioning approach.

MediumSystem Design
20 practiced

You need to call a new downstream service from an existing microservice. Design the integration so a downstream failure doesn't take down your service: include timeouts, retry policies, fallbacks, circuit breakers, bulkheads, and monitoring signals. Also explain how you would add and later remove this dependency with minimal production risk.

MediumTechnical
24 practiced

Explain heuristics you would use to decompose a monolith into microservices so future features can be delivered as separate services with minimal refactor. Provide a concrete migration plan showing how you would extract one domain (e.g., payments or search) using the strangler pattern and consumer-driven contracts.

HardSystem Design
19 practiced

You want to migrate a synchronous workflow to an event-sourced asynchronous pipeline. Design the migration path: dual-write strategy, event schema evolution, how to onboard and version consumers, reconciliation and data parity checks, and rollback strategy to ensure correctness during the transition period.

Unlock Full Question Bank

Get access to all Object-Oriented Programming and Design interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.