// file: point.h // Point class definition // represents [x,y] coordinate pair as private data members. #ifndef POINT_H #define POINT_H class Point { public: Point( double = 0, double = 0 ); // default constructor void setX( double ); // set x in coordinate pair double getX() const; // return x from coordinate pair void setY( double ); // set y in coordinate pair double getY() const; // return y from coordinate pair void print() const; // output Point object private: double x; // x part of coordinate pair double y; // y part of coordinate pair }; // end class Point #endif /* to complement the example from Chapter 9, Deitel & Deitel: C++ How to Program. Fourth edition. * Prentice Hall, 2003. */