-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChequing.cpp
More file actions
48 lines (40 loc) · 978 Bytes
/
Copy pathChequing.cpp
File metadata and controls
48 lines (40 loc) · 978 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
/*
Chequing.cpp
Teng Zhao: 40089560
Thomas Flynn: 40034877
*/
#include "Chequing.h"
#include "Customer.h"
Chequing::Chequing() :Account() {
cheque = false;
overdraft = 0;
}
Chequing::Chequing(string a, double b, double c, bool d, double e) : Account(a, b, c) {
cheque = d;
overdraft = e;
}
void Chequing::setCheque(bool a) {
cheque = a;
}
void Chequing::setOverdraft(double a) {
overdraft = a;
}
void Chequing::printAccount() {
cout << "----- Chequing 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 << "Cheque Privilege: ";
if (cheque == true)
cout << "Yes" << endl;
else if (cheque == false)
cout << "No" << endl;
cout << "Overdraft Amount: " << overdraft << endl;
}