-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAccount.h
More file actions
36 lines (30 loc) · 929 Bytes
/
Copy pathAccount.h
File metadata and controls
36 lines (30 loc) · 929 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
#ifndef ACCOUNT_H
#define ACCOUNT_H
#include <string>
#include <mutex>
#include <memory>
using namespace std;
enum class AccountType { SAVINGS, CHECKING, BUSINESS };
class Account {
public:
int account_id;
string account_holder_name; // Added account holder name
int age; // Added age
double balance;
bool is_active;
string pin;
double interest_rate;
double overdraft_limit;
double loan_balance;
AccountType account_type;
unique_ptr<mutex> mtx;
Account(int id, const string& name, int age, double initial_balance, const string& pin, AccountType type);
Account(const Account& other);
Account(Account&&) noexcept;
Account& operator=(const Account& other);
Account& operator=(Account&&) noexcept;
~Account() = default;
bool authenticate(const string& pin) const;
double get_balance();
};
#endif