00
05
06 #ifndef POINT2_H_
07 #define POINT2_H_
08
09 class Point {
10 private:
11 double *point_representation;
12
13 public:
14 Point(double x_coord, double y_coord):
15 point_representation{new double[2]{x_coord, y_coord}} {};
16 Point():
17 point_representation{new double[2]{0.0, 0.0}} {};
18
19 Point::~Point()
20 { delete[] point_representation; };
21
22 double getx () const;
23 double gety () const;
24 void move(double, double);
25 double distance_to(Point) const;
26 };
27
28 std::ostream& operator<<(std::ostream&, const Point&);
29
30 #endif /* POINT2_H_ */
31