// circle2.h #ifndef CIRCLE2_H #define CIRCLE2_H // // Define a class that can be used to get objects of type Circle. // A circle is a shape, so it makes sense for Circle2 to inherit Shape2. // A class defines a data structure and the member functions // that operate on the data strcuture. // The name of the class becomes a type name. #include "shape2.h" class Circle2 : public Shape2 // <-- the colon ":" means "inherit" // the 'public' part should be first, the user interface // the 'private' part should be last, the safe data { public: Circle2(double X, double Y, double R); // a constructor void Show(); // a member function void Set(double R); // set a new radius // by inheritance Move is here private: double radius; // by inheritance Xcenter and Ycenter are here }; // end Circle2 #endif // CIRCLE2_H