#include <iostream>
class Date
{
int month;
int day;
int year;
public:
Date()
:month(1), day(1), year(2000)
{
}
Date(int Month, int Day, int Year)
:month(Month), day(Day), year(Year)
{
}
void Display() const
{
std::cout << month << "/" << day << "/" << year;
}
};
int main()
{
Date date1;
Date date2(6, 29, 2020);
std::cout << "Date1: "; date1.Display(); std::cout << "\n";
std::cout << "Date2: "; date2.Display(); std::cout << "\n";
return 0;
}
Comments
Leave a comment