#include<iostream>
#include<string>
using namespace std;

class Date
{
  private:
    int month; 
    int day; 
    int year; 
  public:
    Date( int mn= 1, int dy= 1, int yr= 1900 ){
      if ( mn > 0 && mn <= 12 ) 
         month = mn;
      else
      {
         month = 1; 
         cout << "Invalid month (" << mn << ") set to 1.\n";
      } 
      year = yr; 
      day = dy; 
      cout << "Date object constructor for date ";
      print();
      cout << endl;
    } 
    void print() const{
       cout << month << '/' << day << '/' << year;
    }
    ~Date(){
       cout << "Date object destructor for date ";
       print();
       cout << endl;        
    } 
}; 



