-
Notifications
You must be signed in to change notification settings - Fork 0
/
Bank.h
84 lines (79 loc) · 1.33 KB
/
Bank.h
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#pragma once
#include <iostream>
#include <string>
using namespace std;
class Bank
{
private:
double accountNum;
string name;
double balance;
string accountType;
public:
Bank();
Bank(double, string, double);
void setActNum(double);
void setName(string);
void setBalance(double);
void setAccountType(string);
double getAccountNumber() const
{
return accountNum;
}
string getName() const
{
return name;
}
double getBalance() const
{
return balance;
}
string getAccountType() const
{
return accountType;
}
void withdraw(double);
void deposit(double);
~Bank();
};
class SavingsAccount : public Bank
{
private:
double annualInterest;
int numDays; //For compounding period
public:
SavingsAccount();
SavingsAccount(double, string, double, double, int);
void setAnnInt(double);
void setNumDays(int);
double getAnnInt() const
{
return annualInterest;
}
double getNumDays() const
{
return numDays;
}
double AddInterest(int, double);
~SavingsAccount();
};
class CheckingAccount : public Bank
{
private:
double minBalance;
double monthlyFee;
public:
CheckingAccount();
CheckingAccount(double, string, double, double, double);
void setMinBalance(double);
void setMF(double);
double getMinBalance() const
{
return minBalance;
}
double getMonthlyFee() const
{
return monthlyFee;
}
~CheckingAccount();
};