summaryrefslogtreecommitdiffstats
path: root/Bachelor/Prog2/Prakt2/geomObj/Circle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Bachelor/Prog2/Prakt2/geomObj/Circle.cpp')
-rw-r--r--Bachelor/Prog2/Prakt2/geomObj/Circle.cpp27
1 files changed, 27 insertions, 0 deletions
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);
+}