Website Summary Files Commits Branches @commit @diff @stats
path: root / Polymorphism / Rectangle.hpp
diff options
context:
space:
mode:
Commitf381519ea261d66a6154013e17d157a27ab14880 (patch)
Author
 Angeld55 <achi_d@abv.bg>
2019-09-19 21:19:10 +0300
Committer
 GitHub <noreply@github.com>
2019-09-19 21:19:10 +0300
Files74d89de87d8e93e237abc87419c04ae47bfe37bf /Polymorphism/Rectangle.hpp
Object-oriented_programming_FMI-f381519ea261d66a6154013e17d157a27ab14880.tar
Object-oriented_programming_FMI-f381519ea261d66a6154013e17d157a27ab14880.tar.gz
Object-oriented_programming_FMI-f381519ea261d66a6154013e17d157a27ab14880.zip
Parentdad8df13e2324b0755052dafeb79589e7f82456e (diff)
Rename Polymorphism/Rectangle.hpp to Polymorphism/Figures/Rectangle.hpp
1 files changed, 0 insertions, 20 deletions
-rw-r--r--Polymorphism/Rectangle.hpp20
diff --git a/Polymorphism/Rectangle.hpp b/Polymorphism/Rectangle.hpp
deleted file mode 100644
index 72d1e7f..0000000
--- a/Polymorphism/Rectangle.hpp
+++ /dev/null
@@ -1,20 +0,0 @@
-#include "Figure.hpp"
-class Rectangle : public Figure
-{
-public:
- Rectangle(int x1, int y1, int x2, int y2) : Figure(4)
- {
- setPoint(0, x1, y1);
- setPoint(1, x2, y1);
- setPoint(2, x2, y2);
- setPoint(3, x1, y2);
- }
- double getPer()
- {
- return 2 * (getPoint(0).getDistTo(getPoint(1)) + getPoint(0).getDistTo(getPoint(3)));
- }
- double getArea()
- {
- return getPoint(0).getDistTo(getPoint(1))* getPoint(1).getDistTo(getPoint(2));
- }
-}; \ No newline at end of file