// File: DateTest.cpp // Use a Date object // Note: No multiple inclusion guard. C++ files aren’t (and shouldn’t be) imported. #include // Quotes instead of <> means find the file in this directory, not in the C++ library #include "Date.h" // Need this so we can declare and use Date objects using namespace std; int main() { // Create a Date object Date D1; // Fill it in? // D1.month=8; D1.day=10; D1.year=2013; // The legal way D1.setDate(8,10,2013); cout << D1.getDateString(); // Exact Output: August 10, 2013 D1.increment(5); // D1 is now on August 15, 2013 (8,15,2013) D1.increment(); // D1 is now on August 16, 2013 (8,16,2013) // We used the default parameter value of 1. // Wouldn’t it be nice to create and fill a Date in in one act? We can! Date D2(8,12,2013); // creates a Date object with the arguments’ data }