1234567891011121314151617181920212223242526272829303132 |
- #include "Figure.h"
- class Rectangle: public Figure
- {
- private:
- double x1, y1, x2, y2, x3, y3, x4, y4;
- template <typename T>
- void init(T X1, T Y1, T X2, T Y2, T X3, T Y3, T X4, T Y4)
- {
- x1 = double(X1);
- y1 = double(Y1);
- x2 = double(X2);
- y2 = double(Y2);
- x3 = double(X3);
- y3 = double(Y3);
- x4 = double(X4);
- y4 = double(Y4);
- }
- public:
- template <typename T>
- Rectangle(T X1, T Y1, T X2, T Y2, T X3, T Y3, T X4, T Y4)
- {
- init(X1, Y1, X2, Y2, X3, Y3, X4, Y4);
- }
- Rectangle(struct Point f, struct Point s, struct Point t, struct Point fo);
- double calc_area();
- double calc_perimiter();
- void name();
- };
|