
- By Riley Wallace
- ·
- Posted Jul 10, 2025 10:29:49 AM
Palindrome Radar
Summary NASA’s latest radar technology captures shape signatures of flying objects as strings of characters. As everyone knows, UFO’s are shaped like..
This kata is well suited to developers who have some familiarity with TDD basics and want to improve their algorithm design skills. It is a stateless, algorithmic version of the classic Tennis kata (where the program also holds the current score and updates its state when a player scores a new point).
Both Tennis and Bowling can also be done holding state (e.g. with a scorePoint()
method of some sort). However, when learning pure algorithmic TDD, we prefer to stay stateless as the added difficulty of maintaining state can distract from the main learning points.
Write a program that accepts two integers, and converts them to a tennis-style score.
The scoring rules of tennis (per Wikipedia) are as follows:
Start with with the following interface:
public class TennisScoreCalculator {
public string Score(int player1Points, int player2Points);
}
Summary NASA’s latest radar technology captures shape signatures of flying objects as strings of characters. As everyone knows, UFO’s are shaped like..
In computer science, a stack is a famous abstract data type that provides certain operations on a collection of elements. Stacks have a long history,..
Santa wants to increase the number of Christmas trees that he has in his allotment.
Join our newsletter for expert tips and inspirational case studies
Join our newsletter for expert tips and inspirational case studies