structure, layout, parser and its modules
This commit is contained in:
14
check/check.cpp
Normal file
14
check/check.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user