/******************************************************************************************** datetest.cpp Testing the Date class ********************************************************************************************/ #include <iostream> using namespace std; #include "date.h" void paces(Date& D); void main() { //no arguments Date dTest; paces(dTest); //create using arguments Date dTest2(7,4,1776); //Jul. 4, 1776 paces(dTest2); cout << "Add the first to the second: "; dTest2.addDate(dTest); dTest2.print(); cout << endl; } void paces(Date& D) { //putting the object through its paces... int i; cout << "Start: "; D.print(); cout << endl; for (i = 0; i < 35; i++) { D.addDay(1); D.print(); cout<< endl; } cout << endl; for (i = 0; i < 15; i++) { D.addMonth(1); D.print(); cout << endl; } cout << endl << "Add 2y: "; D.addYear(2); D.print(); cout << endl << endl; }