







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!








public protected private
class sphere { public: sphere(); sphere(double r); … double getVolume(); void setRadius(double r); … void display(); private: double theRadius; }; class ball:public sphere { public: ball(); ball(double r string n); … string getName(); void setName(string n); … void display(); private: string name; };
class sphere { public: sphere(); sphere(double r); … double getVolume(); void setRadius(double r); … void display(); private: double theRadius; }; class ball:public sphere { public: ball(); ball(double r string n); … string getName(); void setName(string n); … void display(); private: string name; };
class flower { public: flower(); virtual void drawBlossom() = 0; virtual void drawStem() = 0; virtual void drawFoliage() = 0; … }; class daisy:public flower { public: virtual void drawBlossom(); virtual void drawStem(); virtual void drawFoliage(); … private: int blossom; // number of petals int stem; // length of stem int foliage // leaves per inch };