-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSaving.cpp
More file actions
43 lines (36 loc) · 924 Bytes
/
Copy pathSaving.cpp
File metadata and controls
43 lines (36 loc) · 924 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
/*
Saving.cpp
Teng Zhao: 40089560
Thomas Flynn: 40034877
*/
#include "Saving.h"
#include "Customer.h"
Saving::Saving():Account() {
maxTransaction = 0;
interestRate = 0;
}
Saving::Saving(string a, double b, double c, int d, double e) : Account(a, b, c) {
maxTransaction = d;
interestRate = e;
}
void Saving::setMaxTransaction(int a) {
maxTransaction = a;
}
void Saving::setInterestRate(double a) {
interestRate = a;
}
void Saving::printAccount() {
cout << "----- Saving Account -----" << endl;
cout << "ID: " << accountNumber << endl;
cout << "Balance: " << balance << endl;
cout << "Transaction Fee: " << fee << endl;
cout << "Owner(s): " << endl;
for (auto& i : ownerList) {
if (i != nullptr) {
cout << "- " << i->getCustomerFirst() << " ";
cout << i->getCustomerLast() << endl;
}
}
cout << "Max Transactions: " << maxTransaction << endl;
cout << "Interest Rate: " << interestRate << endl;
}