// file: CircleProtected.h // CircleProtected class derives from PointProtected class // adds private radius to protected [x,y] coordinates of base class // expanding the hierarchy with a CylinderProtected class in the same style // requires the private radius to become protected #ifndef CIRCLEPROTECTED_H #define CIRCLEPROTECTED_H #include "pointProtected.h" // PointProtected class definition class CircleProtected : public PointProtected { public: // default constructor CircleProtected( double = 0, double = 0, double = 0.0 ); void setRadius( double ); // set radius double getRadius() const; // return radius double getDiameter() const; // return diameter double getCircumference() const; // return circumference double getArea() const; // return area void print() const; // output CircleProtected object private: double radius; // CircleProtected's radius }; // end class CircleProtected #endif /*Adapted from Deitel & Deitel: C++ How to Program. Fourth edition. * Chapter 9 * Prentice Hall, 2003. */