// file: point.cpp
// Point class member-function definitions.
#include <iostream>  

using std::cout;

#include "point.h"   // Point class definition

// default constructor
Point::Point( double xValue, double yValue )
   : x( xValue ), y( yValue )
{
   // empty body 

} // end Point constructor

// set x in coordinate pair
void Point::setX( double xValue )
{
   x = xValue; // no need for validation

} // end function setX

// return x from coordinate pair
double Point::getX() const
{
   return x;

} // end function getX

// set y in coordinate pair
void Point::setY( double yValue )
{
   y = yValue; // no need for validation

} // end function setY

// return y from coordinate pair
double Point::getY() const
{
   return y;

} // end function getY
   
// output Point object
void Point::print() const
{
   cout << '[' << getX() << ", " << getY() << ']';

} // end function print

/* to complement the example from Chapter 9, Deitel & Deitel: C++ How to Program. Fourth edition.
 * Prentice Hall, 2003. 
 */
