…and cubes and cylinders
class cube : public body {
cube (const float, const Color &c);
virtual float GetVolume() const;
virtual float GetSurface() const;
// the assignment operator
cube& operator= ( const cube & );
class cylinder : public body {
cylinder (const float,const float);
cylinder (const float,const float,const Color &c);
cylinder (const cylinder &);
virtual float GetVolume() const;
virtual float GetSurface() const;
// the assignment operator
cylinder& operator= ( const cylinder & );
Take a look at the code and see how it is done. It is in the “body_prefinal” directory. All is there, but we have one more little thing to take care of... Stay tuned for the “final” body class.