#include "check.h" #include "../goods/goods.h" Check::Check() {} void Check::add_goods(Goods goods) { this->goods.push_back(goods); } void Check::add_goods(std::vector &goods) { for (auto g : goods) { this->goods.push_back(g); } } double Check::calculae_total_price() { double total = 0.0; for (Goods &g : goods) { total += g.calculate_total_price(); } return total; } std::vector& Check::get_goods() { return goods; }