#include "sale.h" #include void Sale::addArticle(std::shared_ptr
articlePtr) { articlePtr->setSale(this); articles_.push_back(articlePtr); } int Sale::sumInCents() { int sum = std::accumulate(articles_.begin(), articles_.end(), 0, [](int a, std::shared_ptr
b) { return a + b->getPrice(); }); return sum; }