-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDate.cpp
59 lines (57 loc) · 1.07 KB
/
Date.cpp
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
51
52
53
54
55
56
57
58
59
/*********************************************************
* file name: Date.cpp
* programmer name: Lukas Belashov
* date created:2/18/2020
* date of last revision:2/18/2020
* details of the revision: None
* short description: The Date Class is a class that stores information about a date.
**********************************************************/
#include <iostream>
#include "Date.h"
using namespace std;
namespace team3Belashov
{ //date function
Date::Date(int m, int d, int y)
{
month = m;
day = d;
year = y;
}
//copy function
Date::Date(const Date& s)
{
month = s.month;
day = s.day;
year = s.year;
}
//setMonth function
void Date::setMonth(int m)
{
month = m;
}
//setDay function
void Date::setDay(int d)
{
day = d;
}
//setYear Function
void Date::setYear(int y)
{
year = y;
}
//getMonth Function
int Date::getMonth() const
{
return month;
}
//getDay Function
int Date::getDay() const
{
return day;
}
//getYear Function
int Date::getYear() const
{
return year;
}
}