/* mascot2.cpp is a driver program to test the Mascot() function.
 *
 * Input:  names of Big 10 schools
 * Output: prompts, mascots of schools
 ****************************************************************/

#include <iostream.h>            // cin, cout, <<, >>
#include <string>                // string, ==, getline()

string Mascot(string university);

int main()
{
  string school;

  for (;;)
  {
    cout << "\nEnter a Big 10 school (Q to quit): ";
    getline(cin, school);

    if (school == "Q" || school == "q") break;

    cout << Mascot(school) << endl;
  }

  return 0;
}

/*** Insert definition of Mascot() from Figure 5.1 here ***/

/* Mascot returns the mascot for a Big 10 university.
 * 
 * Receive:      university, a string
 * Precondition: university is a Big 10 university
 * Return:       the (string) mascot of university
 ******************************************************/

string Mascot(string university)
{
   if (university == "Illinois")
      return "Fighting Illini";
   else if (university == "Indiana")
      return "Hoosiers";
   else if (university == "Iowa")
      return "Hawkeyes";
   else if (university == "Michigan")
      return "Wolverines";
   else if (university == "Michigan State")
      return "Spartans";
   else if (university == "Minnesota")
      return "Golden Gophers";
   else if (university == "Northwestern")
      return "Wildcats";
   else if (university == "Ohio State")
      return "Buckeyes";
   else if (university == "Penn State")
      return "Nittany Lions";
   else if (university == "Purdue")
      return "Boilermakers";
   else if (university == "Wisconsin")
      return "Badgers";
   else
   {
      cerr << "Mascot: " << university 
           << " is not known by this program!" << endl;
      return "";
   }
}

