-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupDate.h
44 lines (42 loc) · 1.19 KB
/
upDate.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef UPDATE_H
#define UPDATE_H
#include <string>
class upDate {
private:
int * ptr;
static int count;
protected:
int getDaysInMonth(int);
public:
upDate();
upDate(int,int,int);
upDate(const upDate &);
~upDate();
std::string display();
void setDate(int,int,int);
int getDay();
int getMonth();
int getYear();
int julian();
void increaseDate(int);
void decreaseDate(int);
static int GetDateCount();
std::string getMonthName();
void operator =(const upDate &);
void operator +=(int);
upDate operator++(int); //post fix
upDate operator++(); //pre fix
upDate friend operator+(upDate&,int);
upDate friend operator+(int,upDate&);
void operator -=(int);
upDate friend operator-(upDate&, int);
upDate friend operator-(int, upDate&);
upDate operator-(upDate);
upDate operator--(int);
upDate operator--();
bool operator==(upDate);
bool operator<(upDate);
bool operator>(upDate);
friend std::ostream & operator<<(std::ostream &os,upDate);
};
#endif