/* tempconversion2.cpp displays a temperature in Fahrenheit, Celsius,
 * and Kelvin, using class Temperature.
 *
 *  Input:  An arbitrary Temperature
 *  Output: Its Fahrenheit, Celsius and Kelvin equivalents
 ********************************************************************/

#include <iostream.h>                     // >>, <<, cin, cout
#include "Temperature.h"                  // Temperature

int main()
{
   cout << "This program shows the Fahrenheit, Celsius, and\n"
           "Kelvin equivalents of a temperature.\n\n";

   char response;
   Temperature theTemperature;              // construction

   do
   {
      cout << "Enter a temperature (e.g., 98.6 F): ";
      cin >> theTemperature;                // input

      cout << "-->"                         // output
           << theTemperature.Fahrenheit()   // its F equivalent
           << " = "
           << theTemperature.Celsius()      // its C equivalent
           << " = "
           << theTemperature.Kelvin()       // its K equivalent
           << endl;       // output

      cout << "\nDo you have more temperatures to convert? ";
      cin >> response;
   }
   while (response == 'Y' || response == 'y');

   return 0;
}

