|
CSIS 250 Fall 2000 Project #3
Add the following function members to the CPoint class in the point00.cpp program file.
Submit the well-documented printed source code and sample output. Provide at least five test cases for each function. Clearly show the operands and the results from each function. Also complete and submit the following self-evaluation table.
Use the following class definition: //class definition //////////////////////////////////////////////////////////// class CPoint { private: int x; int y; public: CPoint (int a=0, int b=0); CPoint (char ch); void display(void) const; void setX (int a); void setY (int b); void setXY (int a, int b); int getX(void) const; int getY(void) const; void getXY (int &a, int &b) const; void copyTo (CPoint &p) const; void copyFrom (const CPoint &p); bool isEqualTo (const CPoint &p) const;
bool operator == (const CPoint &p) const; bool operator != (const CPoint &p) const; CPoint operator -(void); double distanceFrom(const CPoint &p1) const; };
|