-
Notifications
You must be signed in to change notification settings - Fork 0
/
system.h
40 lines (37 loc) · 1.71 KB
/
system.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
#ifndef SYSTEM_H
#define SYSTEM_H
#include "authentication.cpp"
class System {
private:
Authentication token_;
Database database_;
public:
System();
System(const System& other);
~System();
System& operator=(const System& other);
Authentication getToken() const;
Client getCurrentClient() const;
Client getClient(const std::string& email) const;
Database getDatabase() const;
void displayUserInfo() const;
void displayDatabase() const;
bool authorize(const int& pin) const;
bool contains(const std::string& email) const;
bool containsCustomerAccount(const Client& client, const std::string& accountName) const;
bool isSignedInCustomer() const;
bool isSignedInAdmin() const;
void signIn(const std::string& email, const std::string& password);
void signOut();
void addCustomer(const Client& client);
void removeCustomer(const Client& client);
void updateCustomer(const Client& oldClient, const Client& newClient);
Account getCustomerAccount(const Client& client, const std::string& accountName) const;
int getCustomerAccountBalance(const Client& client, const std::string& accountName) const;
void addAccount(const Client& client, const Account& account);
bool closeAccount(const Client& client, const std::string& accountName);
void updateCustomerAccount(const Client& client, const Account& oldAccount, const Account& newAccount);
void deposit(const int& pin, const std::string& accountName, const int& amount);
void withdrawl(const int& pin, const std::string& accountName, const int& amount);
};
#endif