From 33613a85afc4b1481367fbe92a17ee59c240250b Mon Sep 17 00:00:00 2001 From: Sven Eisenhauer Date: Fri, 10 Nov 2023 15:11:48 +0100 Subject: add new repo --- Bachelor/Prog2/Prakt2/geomObj/Circle.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Bachelor/Prog2/Prakt2/geomObj/Circle.cpp (limited to 'Bachelor/Prog2/Prakt2/geomObj/Circle.cpp') diff --git a/Bachelor/Prog2/Prakt2/geomObj/Circle.cpp b/Bachelor/Prog2/Prakt2/geomObj/Circle.cpp new file mode 100644 index 0000000..14415bf --- /dev/null +++ b/Bachelor/Prog2/Prakt2/geomObj/Circle.cpp @@ -0,0 +1,27 @@ +#include "Circle.h" + +const double pi = 3.14159265358979; + +Circle::Circle() + :radius(.0) +{ +} + +Circle::Circle(double newR) + :radius(newR) +{ +} + +Circle::~Circle() +{ +} + +double Circle::getArea() +{ + return (radius * radius * pi); +} + +double Circle::getCircumference() +{ + return (2 * radius * pi); +} -- cgit v1.2.3