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
+13
View File
@@ -0,0 +1,13 @@
#include "inheritance.hpp"
namespace oop {
Circle::Circle(double radius) : radius_(radius) {}
auto Circle::name() const -> std::string { return "Circle"; }
auto Circle::area() const -> double { return 3.141592653589793 * radius_ * radius_; }
Rectangle::Rectangle(double width, double height) : width_(width), height_(height) {}
auto Rectangle::name() const -> std::string { return "Rectangle"; }
auto Rectangle::area() const -> double { return width_ * height_; }
} // namespace oop