|
@@ -0,0 +1,33 @@
|
|
|
+#include "Figure.h"
|
|
|
+
|
|
|
+class Ellips: public Figure
|
|
|
+{
|
|
|
+ private:
|
|
|
+ double centerX, centerY, axisA, axisB;
|
|
|
+
|
|
|
+ template <typename T>
|
|
|
+ void init(T center_x, T center_y, T axis_a, T axis_b)
|
|
|
+ {
|
|
|
+ centerX = double(center_x);
|
|
|
+ centerY = double(center_y);
|
|
|
+ axisA = double(axis_a);
|
|
|
+ axisB = double(axis_b);
|
|
|
+ }
|
|
|
+
|
|
|
+ public:
|
|
|
+ template <typename T>
|
|
|
+ Ellips(T center_x, T center_y, T axis_a, T axis_b)
|
|
|
+ {
|
|
|
+ init(center_x, center_y, axis_a, axis_b);
|
|
|
+ }
|
|
|
+
|
|
|
+ template <typename T>
|
|
|
+ Ellips(struct Point center, T axis_a, T axis_b)
|
|
|
+ {
|
|
|
+ init(center.x, center.y, axis_a, axis_b);
|
|
|
+ }
|
|
|
+
|
|
|
+ double calc_area();
|
|
|
+ double calc_perimiter();
|
|
|
+ void name();
|
|
|
+};
|