-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIncome.cpp
More file actions
53 lines (46 loc) · 1.16 KB
/
Income.cpp
File metadata and controls
53 lines (46 loc) · 1.16 KB
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
#include "Income.h"
#include "SupportMethods.h"
void Income :: setupDate (int newDate) {
if (newDate >= 0) {
this -> incomeDate = newDate;
}
}
void Income :: setupStringDate (string newDate) {
incomeDate = newDate;
}
void Income :: setupIncomeId (int newIncomeId) {
if (newIncomeId >= 0) {
this -> incomeId = newIncomeId;
}
}
void Income :: setupUserId (int newUserId) {
if (newUserId >= 0) {
this -> userId = newUserId;
}
}
void Income :: setupIncomeName (string newIncomeName) {
this -> incomeName = newIncomeName;
}
void Income :: setupIncomeAmount (float newIncomeAmount) {
if(newIncomeAmount >= 0) {
this -> incomeAmount = newIncomeAmount;
}
}
int Income :: getIncomeId() {
return this -> incomeId;
}
string Income :: getIncomeName() {
return this -> incomeName;
}
float Income :: getIncomeAmount() {
return this -> incomeAmount;
}
string Income :: getIncomeDate() {
return this -> incomeDate;
}
int Income :: getUserId() {
return this -> userId;
}
int Income :: getIntDate() {
return SupportMethods :: convertStringToInt (SupportMethods :: removeDashFromDate(incomeDate));
}