/*---- header file for class: ColorPoint a ColorPoint represents a point in a 2-dimensional coordinate space that has a color by: Sharon Tuttle last modified: 2022-11-11 - corrected/cleaned up after class 2022-11-10 - modified during class, W12-2 2022-11-08 - initial version, from W12-1 ----*/ #ifndef COLORPOINT_H #define COLORPOINT_H #include <string> #include "Point.h" using namespace std; class ColorPoint: public Point { public: // constructors ColorPoint(); ColorPoint(double init_x, double init_y, string init_color); // overloaded == operator // (*MAYBE* because it ADDS an == when comparing // a ColorPoint to the INHERITED == when // comparing a Point... I THINK...) bool operator==(const ColorPoint& rhs); // accessors string get_color() const; // mutators void set_color(string new_color); // these happen to be REDEFINED versions of the // inherited display and to_string methods void display() const; string to_string() const; // this is an OVERLOADED display method void display(string desired_start) const; private: string color; }; #endif