/* This program tests class Day.

   Output: A simple Day-dependent message
------------------------------------------------------------------*/

#include <iostream.h>

#include "Day.h"

void Child(const Day&);

int main(void)
{
   for (Day D = Monday; D <= Saturday; D++)
      Child(D);

   Child(Sunday);

   return 0;
}


//------------------------------------------------------------------

void Child(const Day& Birth)
{
   switch(Birth.DayValue())
   {
      case Sunday:
         cout << "But the child that is born on the Sabbath day\n"
              << "  is bonny and blithe, and good and gay.\n";
         break;
      case Monday:
         cout << Birth << "'s child is fair of face.\n";
         break;
      case Tuesday:
         cout << Birth << "'s child is full of grace.\n";
         break;
      case Wednesday:
         cout << Birth << "'s child is full of woe.\n";
         break;
      case Thursday:
         cout << Birth << "'s child has far to go.\n";
         break;
      case Friday:
         cout << Birth << "'s child is loving and giving.\n";
         break;
      case Saturday:
         cout << Birth << "'s child works hard for its living.\n";
         break;
      default:
         cerr << "*** Child: invalid Day value received: "
              << Birth << endl;
   }
}

