It was an Interview Question , interviewer wanted both HLD and LLD. I came up with something like:
Events API ---> Queuing Mechanism ----> Scorecard system --> display and database
what i'm looking for here is the view on how the class diagram would look for the score card?
Every Ball is considered to be an event.
i Have classes for Ball, Wicket, Team, Player, Over, Run, and Match \n
- Match <-- consists of Teams[2]\n
- Team <-- consists of players[11] each, and RunsScored, Wickets taken etc
- Over <-- consists of balls
- Ball <-- can be of Enum {Extra,Normal, Wicket} and has a ballnumber {1-6} and has Runs Scored
- Run <-- consists of Player, int runs
- Wicket <-- Player whoGotOut, Player whoTookWicket, Player assistIfAny, and is of WicketType{BOLD,CAUGHT,LBW,STUMPED,RUNOUT,etc}
Aucun commentaire:
Enregistrer un commentaire