1234567891011121314151617181920212223242526272829303132 |
- #include "Figure.h"
- class Circle: public Figure
- {
- private:
- double centerX, centerY, Radius;
- template <typename T>
- void init(T center_x, T center_y, T radius)
- {
- centerX = double(center_x);
- centerY = double(center_y);
- Radius = double(radius);
- }
- public:
- template <typename T>
- Circle(T center_x, T center_y, T radius)
- {
- init(center_x, center_y, radius);
- }
- template <typename T>
- Circle(struct Point center, T radius)
- {
- init(center.x, center.y, radius);
- }
- double calc_area();
- double calc_perimiter();
- void name();
- };
|