/* geology.cpp allows a user to retrieve information about rocks.
 *
 * Receive: the name of a rock
 * Output:  the known information about that rock
 ****************************************************************/

#include <iostream>                       // cin, cout
using namespace std;
#include "Rock.h"                         // class Rock   

int main()
{
   cout << "This program provides information about "
           "specific rocks.\n";
   
   Rock aRock;                            // input variable
   char response;                         // query response

   do
   {                
      cout << "\nEnter the name of a rock: ";
      cin >> aRock;
      
      if ( cin.good() )
        cout << endl << aRock
             << " is classified as a(n) " << aRock.kind()
//             << " rock, and\n its texture is " << aRock.texture() 
             << endl;
      else
      {
         cerr << "That kind of rock is not supported." << endl;
         cin.clear();
      }

      cout << "\nEnter 'c' to continue, anything else to quit: ";
      cin >> response;
   }
   while (response == 'c');



   return 0;
}
