2dbi

Tennis Scoring (OOP)

viaGlassdoor

Problem

Model a tennis match scoring system using OOP: track points within a game (love/15/30/40), deuce/advantage, games, and sets.

What to look for

  • Clean class decomposition (Match / Set / Game / Score)
  • Correct deuce and advantage transitions
  • Readable state transitions over clever tricks

Follow-ups

Expect up to 2 follow-ups extending the rules; aim to solve the core then discuss extensions.

Add a follow-up question they asked
No follow-ups yet. Be the first to add one.
asked …
LeaderboardSalary
Language
Account