- By Emmanuel Valverde
- ·
- Posted Mar 5, 2024 12:05:53 PM
Morning Routine
As a forgetful person, I need to remember my morning routine. Because of this, I have created a program that, depending on the time of day, will tell..
Inspired by the creative works of Gawain Hewitt: https://gawainhewitt.co.uk/
There's a spot in the forest where songbirds like to sing together. This spot has three very nice branches, which the birds like to perch on, but each branch can only hold 1 bird.
When a bird is on a branch it sings a song, depending on which branch it’s on, it will sing a different song.
If the bird is joined by other birds they sing together, and the song changes. There is a different song sung depending on how many birds there are, and which branches the other birds are on. No song is sung when there are no birds.
No individual song is the same in different combinations of how many birds there are, and what branches each are on.
Given branches 1, 2, and 3, and birds A, B, and C, can you figure out how many different songs can be sung by the birds, where birds can be on any branch, or not on a branch at all.
Using TDD, create a solution to figure out how many different songs can be sung using three birds and three branches.
Examples:
Tip: build up using incremental TDD steps.
Advanced:
- what happens if the amount of branches could be configurable?
- what happens if the amount of birds is configurable?
i.e. 3 branches and 4 birds, 4 branches and 2 birds, 5 branches and 5 birds
As a forgetful person, I need to remember my morning routine. Because of this, I have created a program that, depending on the time of day, will tell..
What do we want to build? We are building a shopping cart for an online grocery shop. The idea of this kata is to build the product in an iterative..
Iteration 1 Business rules We want to build an ATM machine and the first thing we need to do, is to create the software that will breakdown which..
Join our newsletter for expert tips and inspirational case studies
Join our newsletter for expert tips and inspirational case studies