/* song1.cpp displays the lyrics for "The Farmer in the Dell".
 * using a function PrintVerse().
 *
 * Input:  none
 * Output: lyrics for the "The Farmer in the Dell"
 ******************************************************************/

#include <iostream.h>              // cin, cout, >>, <<
#include <string>                  // string

void PrintVerse(string restOfLine);

int main()
{
   PrintVerse("farmer in the dell");
   PrintVerse("farmer takes a wife");
   PrintVerse("wife takes a child");
   PrintVerse("child takes a nurse");
   PrintVerse("nurse takes a cow");
   PrintVerse("cow takes a dog");
   PrintVerse("dog takes a cat");
   PrintVerse("cat takes a rat");
   PrintVerse("rat takes the cheese");
   PrintVerse("cheese stands alone");

   return 0;
}


/* PrintVerse() prints one verse of "The Farmer in the Dell".
 *
 * Receive: restOfLine, a string.
 * Output:  a verse with restOfLine inserted appropriately.
 **************************************************************/

void PrintVerse(string restOfLine)
{
   const string verse = 
                      "The " + restOfLine + "\n" +
                      "The " + restOfLine +  "\n" +
                      "Hi-ho, the derry-o\n" +
                      "The " + restOfLine + "\n";

   cout << verse << endl;
}


