checks-parser/check/check.cpp

15 lines
304 B
C++
Raw Normal View History

#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;
}