//I need to change this program from using inheritance to using composition.
//Could someone please show me how? I have two other programs that I can surely do myself.
//I'm really in search of a sample.
// Fig. 9.17: point3.h
// Point3 class definition represents an x-y coordinate pair.
#ifndef POINT3_H
#define POINT3_H
class Point3 {
public:
Point3( int = 0, int = 0 ); // default constructor
void setX( int ); // set x in coordinate pair
int getX() const; // return x from coordinate pair
void setY( int ); // set y in coordinate pair
int getY() const; // return y from coordinate pair
void print() const; // output Point3 object
private:
int x; // x part of coordinate pair
int y; // y part of coordinate pair
}; // end class Point3
#endif