summaryrefslogtreecommitdiff
path: root/source/customer.cc
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-05-31 00:00:12 -0700
committerFuwn <[email protected]>2024-05-31 00:20:41 -0700
commit968e1c4af014b7f40bfaa4f57fcc0f38e5e0d847 (patch)
treedf80525ad0cc9e4b561bfb0772c30ccc5b64b4a2 /source/customer.cc
parentfeat: initial commit (diff)
downloadcst_136_assignment_eight-main.tar.xz
cst_136_assignment_eight-main.zip
feat: final releaseHEADmain
Diffstat (limited to 'source/customer.cc')
-rw-r--r--source/customer.cc29
1 files changed, 29 insertions, 0 deletions
diff --git a/source/customer.cc b/source/customer.cc
new file mode 100644
index 0000000..c4bcf97
--- /dev/null
+++ b/source/customer.cc
@@ -0,0 +1,29 @@
+#include <book_store/book.hh>
+#include <book_store/customer.hh>
+#include <book_store/price.hh>
+
+namespace book_store::consumer {
+using namespace product;
+
+auto customer::books_bought() const noexcept -> book::size_type {
+ return this->_books_bought;
+}
+
+auto customer::amount_spent() const noexcept -> price::usd {
+ return this->_amount_spent;
+}
+
+auto customer::is_member() const noexcept -> bool { return this->_is_member; }
+
+auto customer::books_bought(book::size_type books_bought) noexcept -> void {
+ this->_books_bought = books_bought;
+}
+
+auto customer::amount_spent(price::usd amount_spent) noexcept -> void {
+ this->_amount_spent = amount_spent;
+}
+
+auto customer::is_member(bool is_member) noexcept -> void {
+ this->_is_member = is_member;
+}
+} // namespace book_store::consumer