#include #include #include "product.h" Product::Product(std::string const& pn, double pr) : product_name{pn}, price{pr} {} std::string Product::to_string() const { std::ostringstream oss {}; oss << product_name << " " << price << "kr"; return oss.str(); } double Product::get_price() const { return price; } std::ostream& operator<<(std::ostream& os, Product const& rhs) { return os << rhs.to_string(); }