#ifndef MEMBER_HH #define MEMBER_HH #include #include "book.hh" #include "person.hh" #include "price.hh" namespace book_store::consumer { class customer : public person { private: product::book::book::size_type _books_bought; product::price::usd _amount_spent; bool _is_member; public: customer(std::string first_name, std::string last_name, std::size_t member_id) : person(std::move(first_name), std::move(last_name), member_id), _books_bought(0), _amount_spent(0) {} customer(std::string first_name, std::string last_name, std::size_t member_id, bool is_member) : person(std::move(first_name), std::move(last_name), member_id), _is_member(is_member) {} customer(std::string first_name, std::string last_name, std::size_t member_id, bool is_member, product::book::size_type books_bought, product::price::usd amount_spent) : person(std::move(first_name), std::move(last_name), member_id), _books_bought(books_bought), _amount_spent(amount_spent), _is_member(is_member) {} customer() = default; customer(const customer &) = default; customer(customer &&) = default; [[nodiscard]] auto books_bought() const noexcept -> product::book::size_type; [[nodiscard]] auto amount_spent() const noexcept -> product::price::usd; [[nodiscard]] auto is_member() const noexcept -> bool; auto books_bought(product::book::size_type books_bought) noexcept -> void; auto amount_spent(product::price::usd amount_spent) noexcept -> void; auto is_member(bool is_member) noexcept -> void; auto operator=(const customer &) -> customer & = default; auto operator=(customer &&) -> customer & = default; }; } // namespace book_store::consumer #endif // MEMBER_HH