classes/point4/point4.h - The class design of class Point. | Lecture 4 - slide 2 : 40 Program 3 |
// Class Point definition - in a header filer. Declaration of operator<< outside the class. // Class design (class definition) separated from class implementation (member definition). class Point { private: double x, y; public: Point(double, double); Point(); double getx () const; double gety () const; void move(double, double); double distance_to(Point) const; }; std::ostream& operator<<(std::ostream&, const Point&);