Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.49 KB | None | 0 0
  1. void Date::showDate(ostream &out) const {
  2.     out << year << "-" << month << "-" << day;
  3. };
  4. void EuropeanDate::showDate(ostream &out) const {
  5.     out << month << "/" << day << "/" << year;
  6. };
  7. void WeekDate::showDate(ostream &out) const {
  8.     out << *weekDay << " ";
  9.     Date::showDate(out);
  10. };
  11.  
  12.  
  13.  
  14.     cout << "Date Class: ";
  15.     dateobj.showDate(cout);
  16.     cout << endl << "European Date Class: ";
  17.     euDateobj.showDate(cout);
  18.     cout << endl << "Week Date Class: ";
  19.     weekDateobj.showDate(cout);
  20.     cout << endl;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement