28 lines
647 B
C++
28 lines
647 B
C++
#ifndef C_C_BANKACCOUNTS_H
|
|
#define C_C_BANKACCOUNTS_H
|
|
|
|
#include <unordered_map>
|
|
#include <memory>
|
|
|
|
#include "Money.h"
|
|
#include "Cash.h"
|
|
#include "Person.h"
|
|
|
|
class BankAccount {
|
|
private:
|
|
std::string name;
|
|
std::shared_ptr<Person> owner;
|
|
std::unique_ptr<Money> money;
|
|
public:
|
|
explicit BankAccount(std::shared_ptr<Person> owner, std::string name);
|
|
std::unique_ptr<BankAccount> operator+(Money* money);
|
|
std::unique_ptr<Money> operator-(int value);
|
|
bool operator<(std::unique_ptr<BankAccount> bankAccount);
|
|
std::string getName();
|
|
std::shared_ptr<Person> getOwner();
|
|
std::unique_ptr<Money> getMoney();
|
|
};
|
|
|
|
|
|
#endif
|