Question: Write a class definition for Point, which represents a point in the Cartesian coordinate system (i.e., x and y). Your Point class should include a
Write a class definition for Point, which represents a point in the Cartesian coordinate system (i.e., x and y). Your Point class should include a default constructor and the following member function:
// set the point to values x, y
void set ( double x, double y );
Overload the << operator to display the point's coordinates.
Then write a small main function that uses a variable of type Point, sets it to the coordinates ( 2.5, 4 ) , and displays its coordinates on cout.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
