15 lines
304 B
C++
15 lines
304 B
C++
|
#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;
|
||
|
}
|