Data类:
#include <iostream>
#include <assert.h>
#include <Windows.h>
using namespace std;
class Date
{
public:
Date(int year=1990,int month=1,int day=1)
:_year(year)
,_month(month)
,_day(day)
{
if (!IsInvalid())
{
assert(false);
}
}
friend istream &operator>>(istream &ii, Date &d);
friend ostream &operator<<(ostream &mm,const Date &d);
Date(const Date&d)
{
_year=d._year;
_month=d._month;
_day=d._day;
}
~Date(){}
bool IsInvalid();
bool isLeapYear(int year);
int GetMonthDay(int year, int month);
void Show();
Date& operator=(const Date& d);
bool operator==(const Date& d);
bool operator!=(const Date& d);
bool operator>=(const Date& d);
bool operator<=(const Date& d);
bool operator>(const Date& d);
bool operator<(const Date& d);
Date operator+(int</