From 35c54d86cb272af48f81abeac8f695ce8775e385 Mon Sep 17 00:00:00 2001 From: Lev Date: Sat, 12 Jun 2021 18:19:40 -0500 Subject: [PATCH] Add Wallet header file --- .../Topic 5/5.1.3/Wallet.h | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 CM2005 Object Oriented Programming/Topic 5/5.1.3/Wallet.h diff --git a/CM2005 Object Oriented Programming/Topic 5/5.1.3/Wallet.h b/CM2005 Object Oriented Programming/Topic 5/5.1.3/Wallet.h new file mode 100644 index 0000000..3c68252 --- /dev/null +++ b/CM2005 Object Oriented Programming/Topic 5/5.1.3/Wallet.h @@ -0,0 +1,21 @@ +#pragma once + +#include +#include + +class Wallet +{ + public: + Wallet(); + /** insert currency to the wallet */ + void insertCurrency(std::string type, double amount); + + /** check if the wallet contains at least this much currency */ + bool containsCurrency(std::string type, double amount); + + /** generate a string representation of the wallet */ + std::string toString(); + + private: + std::map currencies; +}; \ No newline at end of file