//MovingObject.h //Brooke Loftus #include #ifndef MAIN_OBJECT //start of macroguard #define MAIN_OBJECT //start of the namespace grouping class MovingObject { public: //constructors MovingObject(); //member functions void initialize(int _x, int _y); //initializes objects with values void setRandColor(); //Resets ball color to a random one void throwObject(int dx, int dy); //makes one movement (dx,dy) int getX(); //returns x-coordinate int getY(); //returns y-coordinate friend ostream& operator << ( ostream& out, const MovingObject& mo ); friend bool operator != (const MovingObject &mo1,const MovingObject &mo2); private: int x; //x-coordinate of object int y; //y-coordinate of object int color; //color of the object }; #endif //end of the macroguard