Problem statement
Design the object model and core APIs for a ten-pin bowling scorekeeper that a single alley terminal runs to track one game for a small group of players.
Operating context. One lane, one game session, 1-6 players bowling in turn order across ten frames each. A frame is normally two rolls; a strike (all ten pins on the first roll) ends the frame early, and a spare (all ten across two rolls) earns a bonus. A strike scores 10 plus the next two rolls, a spare 10 plus the next roll, so a frame's final value can depend on rolls that have not happened yet. The tenth frame grants a third roll when it holds a strike or spare. Everything is in-process; the model is fed roll-by-roll from the lane's pin sensor.
Out of scope. Pin-setting and sensor hardware, multi-lane leagues and tournaments, handicap and league-average systems, long-term stat persistence, and any UI or scoreboard rendering.
What to produce. The class hierarchy (game, player, frame, roll, scorecard), the public API each class exposes, and the frame state transitions (open, strike, spare, complete, plus the tenth-frame special case). Be explicit about how a strike or spare defers its score until the bonus rolls arrive, how the tenth frame's third roll is encapsulated rather than special-cased everywhere, and how a rule variant (no-tap, low-ball) would plug in without rewriting the roll loop.
Requirements
This assessment is a Premium feature.
The statement above is free to read. The functional and non-functional requirements, and the graded canvas that scores your design against them, come with Premium.
Topics
- System Design LLD
- Oop Solid
- Patterns State
- Patterns Strategy
- Domain Games