// File: TestDate.cpp // Driver for class Date #include #include "Date.h" int main() { Date d1, d2( 12, 27, 1992 ), d3( 0, 99, 8045 ); cout << "d1 is " << d1.getDateString() << "\nd2 is " << d2.getDateString() << "\nd3 is " << d3.getDateString() << "\n\n"; d3.setDate( 2, 28, 1992 ); cout << "d3 is " << d3.getDateString() << endl; Date d4(d3); cout << "d4 is " << d4.getDateString() << endl; cout << "How many days to increment " << d1.getDateString() << " ? >"; int days; cin >> days; d1.increment(days); cout << "d1 is " << d1.getDateString() << endl; int y; cout << "What year to check for leap year?"; cin >> y; cout << y << " is "; if (!(leapYear(y))) cout << "not "; cout << "a leap year\n"; return 0; }