checks-parser/check/check.cpp

21 lines
368 B
C++
Raw Normal View History

2024-11-22 23:26:42 +03:00
#include "check.h"
#include "../goods/goods.h"
Check::Check() {}
void Check::add_goods(Goods goods) { this->goods.push_back(goods); }
double Check::calculae_total_price() {
double total = 0.0;
for (Goods g : this->goods) {
total += g.calculate_total_price();
}
return total;
}
std::vector<Goods>& Check::get_goods() {
return goods;
}