-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAccount.h
55 lines (48 loc) · 1.33 KB
/
Account.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
#define _CRT_SECURE_NO_WARNINGS
#ifndef ACCOUNT_H
#define ACCOUNT_H
#include "Person.h"
#include "Transaction.h"
//#include "Transaction.h"
using namespace std;
class Transaction;
class Account
{
//C'tor && D'tor
public:
Account();
Account(Person** persons, int count, double balance);
Account(const Person& person, double balance);
Account(const Account& other);
//~Account();
//Metods
public:
void SetPersons(Person** persons, int count);
void SetAccountNumber(int number);
void SetBalance(double balance);
void SetTransactions(Transaction** newTransaction, int count);
Transaction** GetTransactions();
int GetNumOfTransactions();
Person** GetPersons() const;
int GetTotalPersons()const;
int GetAccountNumber() const;
double GetBalance() const;
public:
void Withdraw(double amount, const char* date);
void Deposit(double amount, const char* date);
void AddPerson(const Person& newPerson, double amount);
void DeletePerson(const Person& oldPerson);
void AddTransaction(const Transaction& newTransaction);
private:
void clearTransactions();
void clearPersons();
//Data members
private:
Transaction** m_transactionList;
int m_numberOfTransaction;
Person** m_persons;
int m_totalPersons;
int m_accountNumber;
double m_balance;
};
#endif //Account.h