Katkat

Implement classes in existing abstract hierarchy

BloombergSoftware Engineer · Technical Screen

Last updated

This question evaluates object-oriented design and implementation skills in Python within the Coding & Algorithms and software engineering domain, focusing on completing concrete subclasses in an existing abstract class hierarchy while preserving public interfaces and type compatibility.

You are given an existing Python codebase that defines multiple classes, including abstract base classes using abc.ABC and @abstractmethod decorators. Without modifying public interfaces or abstract base classes, implement the missing logic in the concrete subclasses so that the system works end-to-end. Constraints:

  1. Honor the Liskov Substitution Principle; any place expecting a base type must work with your concrete types.
  2. Do not change method signatures, inheritance, or module-level APIs; implement only TODOs in concrete classes.
  3. Clearly separate responsibilities (e.g., parsing, validation, and execution) using composition where appropriate.
  4. Ensure correct handling of edge cases and error propagation as indicated by docstrings and type hints.
  5. Provide unit tests that demonstrate the behavior of each implemented class and key interactions.
  6. Briefly explain how you navigated a large (≈200 lines) skeleton with abstract methods to identify implementation points and avoid confusion.