The “Situation”

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.

Your Task

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!