-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTransaction.cpp
More file actions
37 lines (35 loc) · 751 Bytes
/
Copy pathTransaction.cpp
File metadata and controls
37 lines (35 loc) · 751 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
#include "Transaction.h"
void Transaction::setUserId(int newUserId) {
if (newUserId>=0){
userId = newUserId;
}
}
void Transaction::setTransactionId(int newTransactionId) {
if (newTransactionId>=0){
transactionId = newTransactionId;
}
}
void Transaction::setDate(string newDate) {
date = newDate;
}
void Transaction::setItem(string newItem) {
item = newItem;
}
void Transaction::setValue(string newValue) {
value = newValue;
}
int Transaction::getUserId() {
return userId;
}
int Transaction::getTransactionId() {
return transactionId;
}
string Transaction::getDate() const {
return date;
}
string Transaction::getItem() {
return item;
}
string Transaction::getValue() {
return value;
}