/********************************************************************************************
datetest.cpp
Jim Millard
for CO211/Fall 1999
Test program for the operations of the date class
********************************************************************************************/
#include <iostream>
#include <string>
using namespace std;
#include "date.h"
int main()
{
cout << endl << endl << "Instantiate w/o arguments: date blankdate;" << endl;
date blankdate;
cout << "Print the object: blankdate.print();" << endl;
blankdate.print();
cout << endl << "Goto tomorrow on it: blankdate.tomorrow();" << endl;
blankdate.tomorrow();
cout << "Print the object again: blankdate.print();" << endl;
blankdate.print();
cout << endl << endl << "Instantiate with arguments: date birthdate(31, 8, 1967);";
date birthdate(31, 8, 1967);
cout << endl << "Print the object" << endl;
birthdate.print();
cout << endl << "Goto tomorrow on it: birthdate.tomorrow();" << endl;
birthdate.tomorrow();
cout << "Print the object again: birthdate.print();" << endl;
birthdate.print();
int month, day, year;
cout << endl << endl << "Enter a date in mm dd yyyy format [Ctrl-D to end]: ";
while (cin >> month >> day >> year)
{
date showme(day, month, year);
cout << "Here's what I interpreted from the input: ";
showme.print();
cout << endl << "This is the day after that: ";
showme.tomorrow();
showme.print();
cout << endl << "And two days later: ";
showme.tomorrow();
showme.print();
cout << endl << endl << "Enter a date in mm dd yyyy format [Ctrl-D to end]: ";
}
return 0;
}