summaryrefslogtreecommitdiffstats
path: root/Bachelor/Prog2/Prakt2/geomObj/Square.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Bachelor/Prog2/Prakt2/geomObj/Square.cpp')
-rw-r--r--Bachelor/Prog2/Prakt2/geomObj/Square.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/Bachelor/Prog2/Prakt2/geomObj/Square.cpp b/Bachelor/Prog2/Prakt2/geomObj/Square.cpp
new file mode 100644
index 0000000..3bd6682
--- /dev/null
+++ b/Bachelor/Prog2/Prakt2/geomObj/Square.cpp
@@ -0,0 +1,25 @@
+#include "Square.h"
+
+Square::Square()
+ :length(.0)
+{
+}
+
+Square::Square(double newlength)
+:length(newlength)
+{
+}
+
+Square::~Square()
+{
+}
+
+double Square::getArea()
+{
+ return length*length;
+}
+
+double Square::getCircumference()
+{
+ return 2 * (length + length);
+}