Implement 2 destructors.

Signed-off-by: Abdulkadir Furkan Şanlı <me@abdulocra.cy>
This commit is contained in:
Abdulkadir Furkan Şanlı
2022-01-12 14:26:17 +01:00
parent 26c5521eaa
commit be86d1338a
2 changed files with 46 additions and 0 deletions
+3
View File
@@ -42,6 +42,7 @@ public:
bool fire (Employee &x);
bool openAccount (Client &x);
bool closeAccount (Client &x);
void closeAccountNoBail (Client &x);
// TODO: implement loans, for now there is placeholder loan() and unloan(),
// in order to simulate loaning and test bailout mechanism.
@@ -85,6 +86,7 @@ class Employee
public:
std::string name;
Employee (std::string x) : name (x){};
~Employee ();
private:
Bank *employer = nullptr;
@@ -97,6 +99,7 @@ class Client
public:
std::string id;
Client (std::string x) : id (x), underMattress (0){};
~Client ();
double earn (const double amount); // Earn money.
double getMattress ();