#include <point.h>
All usefull operators are overloaded.
Public Member Functions | |
Point (void) | |
Default constructor. | |
Point (double xcoord, double ycoord) | |
Copy constructor. | |
Public Attributes | |
double | x |
The x-coordinate of the point. | |
double | y |
The y-coordinate of the point. | |
Friends | |
Point | operator+ (const Point, const Point) |
Overloaded operator +. | |
Point | operator- (const Point, const Point) |
Overloaded binary operator -. | |
Point | operator * (const Point, const Point) |
Overloaded operator *. | |
Point | operator- (const Point) |
Overloaded unary operator -. |
|
Default constructor. Initialises the x member and y member to zero. |
|
Overloaded operator *. Multiplies the x members and y members of the two operands respectively and returns another Point object with this result. |
|
Overloaded operator +. Add the x members and y members of the two operands respectively and returns another Point object with this result. |
|
Overloaded unary operator -. Returns the negetive of the inidivisual coordinates in another Point object. |
|
Overloaded binary operator -. Subtracts the x member and y member of the second operand from the x and y members of the first operand respectively and returns another Point object with this result. |