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