// Test driver

#include "Time.h"
#include <iostream>
using namespace std;

int main()
{
  Time mealTime,
       goToWorkTime;

  Set(mealTime, 5, 30, 'P');

  cout << "We'll be eating at ";
  Display(mealTime, cout);
  cout << endl;

  Set(goToWorkTime, 5, 30, 'P');    // Try other values also: 'P' -> 'A'
  cout << "You leave for work at ";
  Display(goToWorkTime, cout);
  cout << endl;
  if (LessThan(mealTime, goToWorkTime))
    cout << "If you hurry, you can eat first.\n";
  else
    cout << "Sorry you can't eat first.\n";

  Advance(goToWorkTime, 0, 30);    // Try other values also: 0 -> 12)
  cout << "You go into work later at ";
  Display(goToWorkTime, cout);
  cout << endl;
  if (LessThan(mealTime, goToWorkTime))
    cout << "If you hurry, you can eat first.\n";
  else
    cout << "Sorry you can't eat with us.\n";
  cout << endl;

}