-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBankAccount.h
More file actions
50 lines (40 loc) · 1.35 KB
/
BankAccount.h
File metadata and controls
50 lines (40 loc) · 1.35 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
40
41
42
43
44
45
46
47
48
49
50
// ===========================================================================
// BankAccount.h
// ===========================================================================
#pragma once
#include <iostream>
class BankAccount
{
private:
const int m_number;
double m_balance;
double m_rate;
private:
static int s_NextAccountNumber;
public:
// c'tor
BankAccount ();
BankAccount (double start);
// getter / setter
int getAccountNumber() const;
double getBalance () const;
double getInterestRate () const;
// public interface
void deposit (double amount);
void withdraw (double amount);
bool equals (const BankAccount& other) const;
void print () const;
// interest
void setInterestRate (double rate);
void updateInterest (int days);
// operators
bool operator== (const BankAccount& other);
bool operator!= (const BankAccount& other);
bool operator< (const BankAccount& other);
bool operator<= (const BankAccount& other);
bool operator> (const BankAccount& other);
bool operator>= (const BankAccount& other);
};
// ===========================================================================
// End-of-File
// ===========================================================================