-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdate.cpp
More file actions
50 lines (42 loc) · 831 Bytes
/
Copy pathdate.cpp
File metadata and controls
50 lines (42 loc) · 831 Bytes
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
45
46
47
48
49
50
//The implementation of the dateObject class
#include "stdafx.h"
#include "date.h"
#include <iostream>
#include <string>
using namespace std;
dateObject::dateObject()
{
day = -1;
year = -1;
month = -1;
};
dateObject::dateObject(int pMonth, int pDay, int pYear)
{
month = pMonth;
day = pDay;
year = pYear;
};
int dateObject::getDay()
{
return day; //Returns the value of day
};
void dateObject::setDay(int setValue)
{
day = setValue; //Sets day to the parameter value
};
int dateObject::getMonth()
{
return month; //Returns the value of month
};
void dateObject::setMonth(int setValue)
{
month = setValue; //Sets month to the parameter value
};
int dateObject::getYear()
{
return year; //Returns the value of year
};
void dateObject::setYear(int setValue)
{
year = setValue; //Sets year to the parameter value
};