Advertisement
Guest User

pinkeen

a guest
Oct 12th, 2009
354
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #ifndef __DATE_H
  2. #define __DATE_H
  3.  
  4. #include <fstream>
  5. #include <iostream>
  6.  
  7. class Date
  8. {
  9.     private:
  10.         int day;
  11.         int month;
  12.         int year;
  13.  
  14.         bool isLeapYear(int year);
  15.         int getMonthLength(int month, int year);
  16.        
  17.  
  18.     public:
  19.         Date(int _month, int _day, int _year);
  20.         void setMonth(int _month);
  21.         void setDay(int _day);
  22.         void setYear(int _year);
  23.  
  24.         int getMonth();
  25.         int getDay();
  26.         int getYear();
  27.  
  28.         void print();
  29.  
  30.         friend std::ostream &operator<<(std::ostream &stream, Date &date);
  31. };
  32.  
  33. #endif
  34.  
Advertisement
RAW Paste Data Copied
Advertisement