Back to notes -- Keyboard shortcut: 'u'        next -- Keyboard shortcut: 'n'  Slide program -- Keyboard shortcut: 't'    A variant of class Point with static members.Lecture 3 - slide 21 : 36
Program 1
class Point {
private: 
  double x, y;
  static Point defaultPoint;        // Cannot be initialized here. 

public:
  Point(double, double);
  Point();                            // Default constructor relies on defaultPoint
  double getx () const;
  double gety () const;
  void move(double, double);
  double distance_to(Point) const; 
  static Point origo();
  static void setDefaultPoint(Point);
  static void setDefaultPoint(double, double);
};

std::ostream& operator<<(std::ostream&, const Point&);