Circle.h 864 B

1234567891011121314151617181920212223242526272829303132
  1. #pragma once
  2. #define _USE_MATH_DEFINES // äë˙ C++
  3. #include <cmath>
  4. #include "Point.h"
  5. //#include "List.h"
  6. class Circle
  7. {
  8. Point center;
  9. double m_radius;
  10. public:
  11. Circle(const Point& point, const double radius)
  12. :center(point), m_radius(radius) {};//constructor: point - radius
  13. Circle(const double x = 0, const double y = 0, const double radius = 0)
  14. :center(x, y), m_radius(radius) {}; //constructor: coordinate of point - radius
  15. Circle(const Circle&); //copy-constructor
  16. ~Circle();//destructor
  17. void Set_x(double x) { }
  18. double Get_area();
  19. bool operator==(const Circle&) const;
  20. friend std::ostream& operator<<(std::ostream& os, const Circle& circle);
  21. friend Circle& operator>>(std::ifstream& file, Circle& circle);
  22. };
  23. std::ostream& operator<<(std::ostream& os, const Circle& circle);
  24. Circle& operator>>(std::ifstream& file, Circle& circle);