Initial Course

This commit is contained in:
David Gil de Gómez Pérez
2026-08-11 17:40:36 +03:00
commit 9aed1d1d86
202 changed files with 3420 additions and 0 deletions
@@ -0,0 +1,26 @@
#include "polymorphism.hpp"
namespace oop {
auto total_area(const std::vector<std::unique_ptr<Shape>>& shapes) -> double {
double total = 0.0;
for (const auto& shape : shapes) {
// TODO: Add each shape's area using polymorphism
(void)shape;
}
return total;
}
auto shape_names(const std::vector<std::unique_ptr<Shape>>& shapes)
-> std::vector<std::string> {
std::vector<std::string> names;
for (const auto& shape : shapes) {
// TODO: Collect shape->name()
(void)shape;
}
return names;
}
auto Counter::copies() -> int { return copies_; }
} // namespace oop