Pick a focused question that fits your time, stack, and interview goal.
How much time do you have?
Show one-drill sessions you can finish now.
15 results across 1 active filter
Page 1 of 1
Separates hiding implementation complexity from controlling access to state, with practical examples where both ideas work together.
Uses public, internal, protected, private, and protected internal deliberately to control API surface and inheritance exposure.
Chooses contracts and shared implementation based on substitutability, state ownership, evolution, and inheritance constraints.
Chooses a type shape from identity, value semantics, mutation, copy cost, default values, and serialization boundaries.
Creates valid objects with clear intent while choosing construction patterns proportionally to optional data, validation, and lifecycle complexity.
Combines focused collaborators for independent behavior while recognizing cases where a genuine stable hierarchy remains simpler.
Uses controlled state transitions and intention-revealing APIs to keep objects valid rather than treating encapsulation as private fields alone.
Connects equality semantics to hash-based collections and chooses identity or value equality deliberately.
Chooses immutable values and controlled mutable entities based on identity, concurrency, invariants, allocation cost, and update semantics.
Uses inheritance only for stable behavioral subtyping and tests whether derived objects preserve the promises callers rely on.
Starts object-oriented design from cohesive state and behavior instead of creating classes for every noun in a requirement.
Separates compile-time overload selection from runtime virtual dispatch and diagnoses method hiding through a base reference.
Explains how callers use one contract while runtime dispatch selects implementation, then connects that mechanism to extensible behavior.
Uses static members for type-wide stateless behavior and constants while avoiding hidden global mutable state and lifetime problems.
Moves invariant-sensitive decisions toward the owning object while keeping orchestration, queries, and cross-boundary work appropriately explicit.