//--------------------------------------------------------------------
// point2.h
//--------------------------------------------------------------------

// Declaration for an expanded two-dimensional Point class.
class Point { public: // Member functions
// Constructors Point ( int xCoord, int yCoord ); // Define a point Point (); // Default constructor
// Derived point attribute double distance (); // Distance from (0,0)
// Modification functions void move ( int dx, int dy ); // Move point void exchangeXY (); // Exchange coordinates void setXY ( int newX, int newY ); // Set x- and y-coordinates
// Point display function void display ();
// Overloaded operators int operator == ( const Point &rightPt ); // Equality operator void operator = ( const Point &rightPt ); // Assignment operator
// Outputs the data members -- used in testing and debugging void showDataMembers ();
private: // Data members
int x, // x-coordinate y; // y-coordinate };