Score Keeper Kata
Problem We need software to deliver the proper data to the scoreboard for a basketball team. Unfortunately the people using our software are not the brightest lights under the sun, so they need six buttons (each team can score either 1, 2 or 3 points with a single shot).
Your Task Write a class ScoreKeeper which offers following methods:
void scoreTeamA1() void scoreTeamA2() void scoreTeamA3() void scoreTeamB1() void scoreTeamB2() void scoreTeamB3() String getScore()
Rules The returned String always has seven characters. An example would be 000:000
Starting Points C++, C#, Clojure, D, Elixir, F#, Go, Haskell, Java, JavaScript, Kotlin, PHP, Python, ReScript, Ruby, Rust, Scala, TypeScript
Clojure, CoffeeScript, C++, C#, Erlang, Groovy, Intercal, Java, JavaScript, Lisp, PHP, Ruby, Scala
Image credits Image by Egga. It shows an exemplary flip chart to facilitate the kata.