// // Example 5.4. Constructor to create a data object set to the date // specified. There is no value checking--The function assumes that // the caller passes a legitimate date. // Pre: mo is an integer between 1 and 12. // dy is an integer between 1 and 31. // yr is an integer between 0 and 9999. // Post: The date object has been created with month mo, // day dy, and year yr. // date::date(int mo, int dy, int yr) { month = mo; day = dy; year = yr; }