structure, layout, parser and its modules

This commit is contained in:
2024-08-19 02:35:16 +03:00
parent d41144a634
commit ffbc929472
258 changed files with 5830 additions and 461 deletions

14
check/check.cpp Normal file
View 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;
}

16
check/check.h Normal file
View File

@@ -0,0 +1,16 @@
#ifndef CHECK_H
#define CHECK_H
#include "../goods/goods.h"
#include <vector>
class Check
{
std::vector<Goods> goods;
public:
Check();
void add_goods(Goods);
double calculae_total_price();
};
#endif // CHECK_H