class Point {
public:
Point (int=0, int=0); // initializes xCoord and yCoord
void setPoint (int, int); // assigns values to xCoord and yCoord
int getX( ) const; // returns value in xCoord
int getY( ) const; // returns value in yCoord
private:
int xCoord; //X coordinate of the point
int yCoord; //Y coordinate of the point
};
Class Line will have member data startPoint and endPoint, both of class Point, as well as the following member functions.
Where's the question? Are you looking for confirmation on whether is OK to have a startPoint() and endPoint() methods? If yes, what are the requirements of the class Line? What are the objectives of the code?