Back to notes -- Keyboard shortcut: 'u'        next -- Keyboard shortcut: 'n'  Slide program -- Keyboard shortcut: 't'    Class Point with a variety of constructors.Lecture 3 - slide 14 : 36
Program 1
class Point {
private: 
  double x, y;

public:
  Point();                    // default constructor:  (0,7)
  Point(double x);            // (x, 20)
  Point(double x, double y);  // (y, y)  
  Point(Point& p);            // copy constructor: (p.x+1, p.y+2) 

  double getx () const;
  double gety () const;
};

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