Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Date::showDate(ostream &out) const {
- out << year << "-" << month << "-" << day;
- };
- void EuropeanDate::showDate(ostream &out) const {
- out << month << "/" << day << "/" << year;
- };
- void WeekDate::showDate(ostream &out) const {
- out << *weekDay << " ";
- Date::showDate(out);
- };
- cout << "Date Class: ";
- dateobj.showDate(cout);
- cout << endl << "European Date Class: ";
- euDateobj.showDate(cout);
- cout << endl << "Week Date Class: ";
- weekDateobj.showDate(cout);
- cout << endl;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement