Class Point- Point.h, Point.cc
Definition:
A point is a class which holds an x and y location on a Cartesian plane.
Typedefs:
None
Included:
#include <iostream.h>

int x
The x location of the point on a Cartesian plane.
int y
The y location of the point on a Cartesian plane.

-
Point()
-
Default constructor.
-
Point(int xVal,
int yVal)
-
Sets the values x and y to the respective
passes values, xVal and yVal.
-
~Point()
-
Destructor. Does absolutely nothing.
-
-
void setX(int xValue)
-
Sets the x variable to the value specified by 'xValue'.
-
void setY(int yValue)
-
Sets the y variable to the value specified by 'xValue'.
-
void getX()
-
Returns the value of the x variable.
-
void getY()
-
Returns the value of the y variable.
-
int getManhattanDistance(Point
*aPoint)
-
Returns the Manhattan distance from this point to the point specified by
'aPoint'.
-
void print()
-
Debugging function. Prints the information contained by this instance
to cout.