Hard
Cricinfo

Design a Cricket Information Platform Object-Oriented Design Interview

Design a cricket scoring domain model covering teams and players, a match, innings, overs and deliveries, batting and bowling scorecards, extras and wickets, striker rotation, over completion, and match results for a configurable limited-overs format.

1. Problem Statement

Design a platform that scores a limited-overs cricket match ball by ball and produces batting and bowling scorecards. Cover teams and players, the match and its innings, overs and deliveries, extras and wickets, and how the match result is decided. State your assumptions about format and rules. Start by clarifying scope and the core objects.

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
    Delivery modeling: legal balls, extras, and credited runs
  • 2
    Over completion (6 legal balls) and innings-ending conditions
  • 3
    Striker rotation on odd runs and at over end
  • 4
    Derived scorecards and target/chase result

4. What Strong Candidates Should Demonstrate

  • Model teams, players, match, innings, overs, and deliveries with clear ownership.
  • Account for legal vs. illegal deliveries and extras correctly.
  • Implement striker rotation and over completion rules.
  • Derive batting and bowling scorecards from deliveries and compute match results.

Want interactive feedback?

Practice this problem in the live coding workspace while the interviewer probes your clarification, implementation, trade-offs, and validation.

Start Interview

Core Concepts

Object-Oriented DesignDomain ModelingState ModelingRule Validation