Category: Refactoring
Code to produce a popular children's nursery rhyme was produced by a web agency for the customer last year. The customer now desires to produce multiple different versions of the song using the same structure but based on different themes, for example a current popular children's movie featuring a cast of animals. The customer asks that you make the song configurable for different lists of animals. The customer cannot guarantee that there will be the same number of animals in each different version.
No documentation was provided by the previous developer and there is only one failing test :(
Refactor the code to allow for the customer's needs. Remember: refactoring can only be done in the presence of tests that are passing, and after refactoring the tests still pass!
TDD (Test Driven Development) style!
A Java version can be found in the java folder;
A PHP version can be found in the PHP folder;
TODO: add javascript and maybe python?
This code kata and exercise files are based on: London Code Dojo, repo and license here Alterations were made to the source code.
The code samples are licensed under the CC-SA-NC-4.0 license, as shown in the LICENSE file.