-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBankAccount_Main.cpp
More file actions
39 lines (32 loc) · 1.04 KB
/
BankAccount_Main.cpp
File metadata and controls
39 lines (32 loc) · 1.04 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
// ===========================================================================
// BankAccount_Main.cpp
// ===========================================================================
#include "BankAccount.h"
void exerciseBankAccount()
{
BankAccount myAccount(50);
myAccount.deposit(50);
myAccount.withdraw(25);
myAccount.print();
BankAccount firstAccount;
firstAccount.print();
BankAccount secondAccount;
secondAccount.deposit(50);
secondAccount.withdraw(25);
secondAccount.print();
BankAccount thirdAccount;
thirdAccount.deposit(100);
thirdAccount.print();
thirdAccount.setInterestRate(5.0);
thirdAccount.updateInterest(365);
thirdAccount.print();
if (firstAccount.equals(secondAccount)) {
std::cout << "Same Balance" << std::endl;
}
else {
std::cout << "Different Balances" << std::endl;
}
}
// ===========================================================================
// End-of-File
// ===========================================================================